fix(router): do not require the creation of empty-path routes when no url left
Closes #12133
This commit is contained in:
@ -90,7 +90,16 @@ class Recognizer {
|
||||
if (!(e instanceof NoMatch)) throw e;
|
||||
}
|
||||
}
|
||||
throw new NoMatch();
|
||||
if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {
|
||||
return [];
|
||||
} else {
|
||||
throw new NoMatch();
|
||||
}
|
||||
}
|
||||
|
||||
private noLeftoversInUrl(segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string):
|
||||
boolean {
|
||||
return segments.length === 0 && !segmentGroup.children[outlet];
|
||||
}
|
||||
|
||||
processSegmentAgainstRoute(
|
||||
|
Reference in New Issue
Block a user