This reverts commit 20cef5078d
.
Breaks Pantheon see cl/224256517.
PR Close #27516
This commit is contained in:
parent
6740d0de74
commit
4f61832d1c
|
@ -70,14 +70,6 @@ class Recognizer {
|
||||||
processSegmentGroup(config: Route[], segmentGroup: UrlSegmentGroup, outlet: string):
|
processSegmentGroup(config: Route[], segmentGroup: UrlSegmentGroup, outlet: string):
|
||||||
TreeNode<ActivatedRouteSnapshot>[] {
|
TreeNode<ActivatedRouteSnapshot>[] {
|
||||||
if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {
|
if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {
|
||||||
const empties = config.filter(r => emptyPathMatch(segmentGroup, segmentGroup.segments, r));
|
|
||||||
if (empties.length !== 0) {
|
|
||||||
try {
|
|
||||||
return this.processSegment(empties, segmentGroup, segmentGroup.segments, outlet);
|
|
||||||
} catch (e) {
|
|
||||||
if (!(e instanceof NoMatch)) throw e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return this.processChildren(config, segmentGroup);
|
return this.processChildren(config, segmentGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -263,20 +263,6 @@ describe('recognize', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should work with children outlets', () => {
|
|
||||||
checkRecognize(
|
|
||||||
[{
|
|
||||||
path: '',
|
|
||||||
component: ComponentA,
|
|
||||||
children: [{path: 'b', outlet: 'b', component: ComponentB}]
|
|
||||||
}],
|
|
||||||
'(b:b)', (s: RouterStateSnapshot) => {
|
|
||||||
checkActivatedRoute((s as any).firstChild(s.root) !, '', {}, ComponentA);
|
|
||||||
checkActivatedRoute(
|
|
||||||
(s as any).firstChild((s as any).firstChild(s.root)) !, 'b', {}, ComponentB, 'b');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should match when terminal', () => {
|
it('should match when terminal', () => {
|
||||||
checkRecognize(
|
checkRecognize(
|
||||||
[{path: '', pathMatch: 'full', component: ComponentA}], '',
|
[{path: '', pathMatch: 'full', component: ComponentA}], '',
|
||||||
|
|
Loading…
Reference in New Issue