Skip to content

Commit 6300434

Browse files
committed
only consider depth if both are index or both aren't
1 parent 80033ee commit 6300434

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎packages/router-core/src/new-process-route-tree.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,8 @@ function isFrameMoreSpecific(
10521052
(next.dynamics === prev.dynamics &&
10531053
(next.optionals > prev.optionals ||
10541054
(next.optionals === prev.optionals &&
1055-
(next.depth > prev.depth ||
1056-
(next.node.isIndex && !prev.node.isIndex)))))))
1055+
(next.node.isIndex > prev.node.isIndex ||
1056+
(next.node.isIndex === prev.node.isIndex &&
1057+
next.depth > prev.depth)))))))
10571058
)
10581059
}

0 commit comments

Comments
 (0)