diff --git a/packages/router/src/recognize.ts b/packages/router/src/recognize.ts index 20cf038216..4c392a2fbe 100644 --- a/packages/router/src/recognize.ts +++ b/packages/router/src/recognize.ts @@ -79,8 +79,11 @@ class Recognizer { processChildren(config: Route[], segmentGroup: UrlSegmentGroup): TreeNode[] { - const children = mapChildrenIntoArray( - segmentGroup, (child, childOutlet) => this.processSegmentGroup(config, child, childOutlet)); + const children: Array> = []; + for (const childOutlet of Object.keys(segmentGroup.children)) { + const child = segmentGroup.children[childOutlet]; + children.push(...this.processSegmentGroup(config, child, childOutlet)); + } checkOutletNameUniqueness(children); sortActivatedRouteSnapshots(children); return children;