File tree 1 file changed +9
-2
lines changed
packages/router/src/matcher
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -545,10 +545,10 @@ function findInsertionIndex(
545
545
if ( insertionAncestor ) {
546
546
upper = matchers . lastIndexOf ( insertionAncestor , upper - 1 )
547
547
548
- if ( __DEV__ && upper === - 1 ) {
548
+ if ( __DEV__ && upper < 0 ) {
549
549
// This should never happen
550
550
warn (
551
- `Finding ancestor route ${ insertionAncestor . record . path } failed for ${ matcher . record . path } `
551
+ `Finding ancestor route " ${ insertionAncestor . record . path } " failed for " ${ matcher . record . path } " `
552
552
)
553
553
}
554
554
}
@@ -571,6 +571,13 @@ function getInsertionAncestor(matcher: RouteRecordMatcher) {
571
571
return
572
572
}
573
573
574
+ /**
575
+ * Checks if a matcher can be reachable. This means if it's possible to reach it as a route. For example, routes without
576
+ * a component, or name, or redirect, are just used to group other routes.
577
+ * @param matcher
578
+ * @param matcher.record record of the matcher
579
+ * @returns
580
+ */
574
581
function isMatchable ( { record } : RouteRecordMatcher ) : boolean {
575
582
return ! ! (
576
583
record . name ||
You can’t perform that action at this time.
0 commit comments