Skip to content

Commit 695b2bf

Browse files
author
Robert Jackson
committed
Avoid attempting to stash dynamic segment names for unloaded routes.
1 parent 24bca85 commit 695b2bf

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
@@ -66,8 +66,10 @@ export function stashParamNames(router: EmberRouter, routeInfos: PrivateRouteInf
6666

6767
routeInfo['_names'] = names;
6868

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

7375
routeInfos['_namesStashed'] = true;

0 commit comments

Comments
 (0)