mnfst 0.5.31 → 0.5.32
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/manifest.router.js +6 -1
- package/package.json +1 -1
package/dist/manifest.router.js
CHANGED
|
@@ -169,7 +169,12 @@ function getBasePath() {
|
|
|
169
169
|
|
|
170
170
|
function pathnameToLogical(pathname) {
|
|
171
171
|
const base = getBasePath();
|
|
172
|
-
if (!base
|
|
172
|
+
if (!base) {
|
|
173
|
+
const p = (pathname || '/').replace(/\/$/, '') || '/';
|
|
174
|
+
if (p === '/' || p === '/index.html' || p === '/index') return '/';
|
|
175
|
+
return p.startsWith('/') ? p : '/' + p;
|
|
176
|
+
}
|
|
177
|
+
if (pathname === base || pathname === base + '/') return '/';
|
|
173
178
|
if (pathname.startsWith(base + '/')) {
|
|
174
179
|
let logical = pathname.slice(base.length) || '/';
|
|
175
180
|
if (logical === '/index.html' || logical === '/index') logical = '/';
|