File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
packages/router/src/matcher Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -545,10 +545,10 @@ function findInsertionIndex(
545545 if ( insertionAncestor ) {
546546 upper = matchers . lastIndexOf ( insertionAncestor , upper - 1 )
547547
548- if ( __DEV__ && upper === - 1 ) {
548+ if ( __DEV__ && upper < 0 ) {
549549 // This should never happen
550550 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 } " `
552552 )
553553 }
554554 }
@@ -571,6 +571,13 @@ function getInsertionAncestor(matcher: RouteRecordMatcher) {
571571 return
572572}
573573
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+ */
574581function isMatchable ( { record } : RouteRecordMatcher ) : boolean {
575582 return ! ! (
576583 record . name ||
You can’t perform that action at this time.
0 commit comments