Skip to content

Commit

Permalink
Fixed interception on a catchAll route
Browse files Browse the repository at this point in the history
  • Loading branch information
Reflex2468 committed Nov 17, 2024
1 parent 2186f7e commit 050a720
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ function toPathToRegexpPath(path: string): string {
const paramName = capture.replace(/\W+/g, '_')

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

0 comments on commit 050a720

Please sign in to comment.