fix(router): Remove usage of `Object.values` to avoid the need for a polyfill (#40370)
`Object.values` is not supported in IE11 without a polyfill. The quickest, most straightfoward fix for this is to simply use `Object.keys` instead. We may want to consider including the polyfill in the CLI in the future or just wait until IE11 support is dropped before using `Object.values`. PR Close #40370
This commit is contained in:
parent
6a9e328432
commit
74175f84ea
|
@ -114,8 +114,8 @@ export class ActivateRoutes {
|
||||||
const contexts = context && route.value.component ? context.children : parentContexts;
|
const contexts = context && route.value.component ? context.children : parentContexts;
|
||||||
const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(route);
|
const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(route);
|
||||||
|
|
||||||
for (const child of Object.values(children)) {
|
for (const childOutlet of Object.keys(children)) {
|
||||||
this.deactivateRouteAndItsChildren(child, contexts);
|
this.deactivateRouteAndItsChildren(children[childOutlet], contexts);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (context && context.outlet) {
|
if (context && context.outlet) {
|
||||||
|
|
Loading…
Reference in New Issue