mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
### What? Interception route rewrites are not properly parsing catch-all segments, which leads to "missing parameter name" errors when passed to `pathToRegexp`. ### Why? The existing `toPathToRegexpPath` function ignores `...` and keeps it as part of the regexp path. This means `pathToRegexp` will attempt to handle `/foo/bar/:...baz` and `/foo/bar/:[...baz]` rather than `/foo/bar/:baz*` ### How? The regex used for matching the path was updated to support the dynamic optional segment, and then we special case catch-all segments Fixes #51784 ---------