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.
@@ -169,7 +169,12 @@ function getBasePath() {
169
169
 
170
170
  function pathnameToLogical(pathname) {
171
171
  const base = getBasePath();
172
- if (!base || pathname === base || pathname === base + '/') return '/';
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 = '/';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mnfst",
3
- "version": "0.5.31",
3
+ "version": "0.5.32",
4
4
  "private": false,
5
5
  "workspaces": [
6
6
  "templates/starter"