Skip to content

Commit

Permalink
revert normalize regex change
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Dec 13, 2021
1 parent 3b49034 commit 2f29e0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/server/normalize-page-path.ts
Expand Up @@ -6,7 +6,7 @@ export function normalizePagePath(page: string): string {
// If the page is `/` we need to append `/index`, otherwise the returned directory root will be bundles instead of pages
if (page === '/') {
page = '/index'
} else if (/^\/index(\/|$)$/.test(page)) {
} else if (/^\/index(\/|$)/.test(page)) {
page = `/index${page}`
}
// Resolve on anything that doesn't start with `/`
Expand Down

0 comments on commit 2f29e0f

Please sign in to comment.