Skip to content

Commit 022375c

Browse files
author
Robert Jackson
committed
Avoid attempting to stash dynamic segment names for unloaded routes.
1 parent 16676eb commit 022375c

File tree

1 file changed

+4
-2
lines changed
  • packages/@ember/-internals/routing/lib

1 file changed

+4
-2
lines changed

packages/@ember/-internals/routing/lib/utils.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ export function stashParamNames(router: EmberRouter, routeInfos: PrivateRouteInf
6565

6666
routeInfo['_names'] = names;
6767

68-
let route = routeInfo.route!;
69-
route._stashNames(routeInfo, dynamicParent!);
68+
let route = routeInfo.route;
69+
if (route !== undefined) {
70+
route._stashNames(routeInfo, dynamicParent!);
71+
}
7072
}
7173

7274
routeInfos['_namesStashed'] = true;

0 commit comments

Comments
 (0)