Skip to content

Commit 07b4972

Browse files
committed
[fixed] Allow repetition in child paths
Allow nested <Route>s to repeat the initial portion of their parent. Fixes #867
1 parent 0bf536e commit 07b4972

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: modules/Route.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class Route {
6767
if (PathUtils.isAbsolute(path)) {
6868
if (parentRoute) {
6969
invariant(
70-
parentRoute.paramNames.length === 0,
70+
path === parentRoute.path || parentRoute.paramNames.length === 0,
7171
'You cannot nest path "%s" inside "%s"; the parent requires URL parameters',
7272
path, parentRoute.path
7373
);

0 commit comments

Comments
 (0)