Skip to content

Commit 050a720

Browse files
committed
Fixed interception on a catchAll route
1 parent 2186f7e commit 050a720

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/next/src/lib/generate-interception-routes-rewrites.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ function toPathToRegexpPath(path: string): string {
1313
const paramName = capture.replace(/\W+/g, '_')
1414

1515
// handle catch-all segments (e.g. /foo/bar/[...baz] or /foo/bar/[[...baz]])
16-
if (paramName.startsWith('...')) {
17-
return `:${paramName.slice(3)}*`
16+
if (capture.startsWith('...')) {
17+
return `:${capture.slice(3)}*`
1818
}
1919
return ':' + paramName
2020
})

0 commit comments

Comments
 (0)