Skip to content

Commit 3963006

Browse files
authored
widen descendant route matching warning (#12324)
1 parent eadc804 commit 3963006

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-router/lib/hooks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ export function useRoutesImpl(
479479
let parentPath = (parentRoute && parentRoute.path) || "";
480480
warningOnce(
481481
parentPathname,
482-
!parentRoute || parentPath.endsWith("*"),
482+
!parentRoute || parentPath.endsWith("*") || parentPath.endsWith("*?"),
483483
`You rendered descendant <Routes> (or called \`useRoutes()\`) at ` +
484484
`"${parentPathname}" (under <Route path="${parentPath}">) but the ` +
485485
`parent route path has no trailing "*". This means if you navigate ` +

0 commit comments

Comments
 (0)