@rspress/shared 1.12.3 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -1170,7 +1170,7 @@ function normalizePosixPath(id) {
|
|
1170
1170
|
}
|
1171
1171
|
var inBrowser = () => !process.env.__SSR__;
|
1172
1172
|
function addLeadingSlash(url) {
|
1173
|
-
return url.charAt(0) === "/" || url
|
1173
|
+
return url.charAt(0) === "/" || isExternalUrl(url) ? url : `/${url}`;
|
1174
1174
|
}
|
1175
1175
|
function removeLeadingSlash(url) {
|
1176
1176
|
return url.charAt(0) === "/" ? url.slice(1) : url;
|
package/dist/index.mjs
CHANGED
@@ -1112,7 +1112,7 @@ function normalizePosixPath(id) {
|
|
1112
1112
|
}
|
1113
1113
|
var inBrowser = () => !process.env.__SSR__;
|
1114
1114
|
function addLeadingSlash(url) {
|
1115
|
-
return url.charAt(0) === "/" || url
|
1115
|
+
return url.charAt(0) === "/" || isExternalUrl(url) ? url : `/${url}`;
|
1116
1116
|
}
|
1117
1117
|
function removeLeadingSlash(url) {
|
1118
1118
|
return url.charAt(0) === "/" ? url.slice(1) : url;
|