rsnext/test/e2e/app-dir/parallel-routes-catchall
Zack Tanner 31a0edbd1b
parallel routes: fix catch-all slots being treated as optional catch-all (#61174)
### What
Catch-all parallel slots were being incorrectly matched to the root of their segment. For example, `@foo/[...catchAll]/page` as a parallel route on `/page.tsx` should not match on `/`, but it should match on `/foo`, `/bar`, ...etc

### Why
The catch-all route normalization logic doesn't treat optional catch-all routes differently from catch-all routes. The assumption was if any catch-all route was found, that it should match the path that shared its prefix.

### How
This updates the normalization logic to handle optional-catchall as it was in the original implementation. For regular catch-all, we ensure that the catch-all base path (for `/[...slug]` that'd be `/`) isn't identical to the path we'd match it to.

Fixes #60613
Closes NEXT-2243
2024-01-30 15:28:47 -08:00
..
app parallel routes: fix catch-all slots being treated as optional catch-all (#61174) 2024-01-30 15:28:47 -08:00
next.config.js fix parallel catch-all route normalization (#59791) 2023-12-22 09:30:23 -08:00
parallel-routes-catchall.test.ts parallel routes: fix catch-all slots being treated as optional catch-all (#61174) 2024-01-30 15:28:47 -08:00