Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 3b15353

Browse files
committed
fix(fw/core): fix toPagePath function
1 parent 7d7b38a commit 3b15353

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

framework/core/routing.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,10 @@ export function toPagePath(url: string): string {
246246
pathname = util.trimPrefix(pathname, '/pages')
247247
}
248248
if (pathname.endsWith('/index')) {
249-
pathname = util.trimSuffix(pathname, '/index')
250-
if (pathname === '') {
251-
pathname = '/'
252-
}
249+
pathname = util.trimSuffix(pathname, 'index')
250+
}
251+
if (pathname === '') {
252+
pathname = '/'
253253
}
254254
return pathname
255255
}

0 commit comments

Comments
 (0)