Skip to content

Commit

Permalink
Avoid attempting to stash dynamic segment names for unloaded routes.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Nov 12, 2020
1 parent 16676eb commit 022375c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/@ember/-internals/routing/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ export function stashParamNames(router: EmberRouter, routeInfos: PrivateRouteInf

routeInfo['_names'] = names;

let route = routeInfo.route!;
route._stashNames(routeInfo, dynamicParent!);
let route = routeInfo.route;
if (route !== undefined) {
route._stashNames(routeInfo, dynamicParent!);
}
}

routeInfos['_namesStashed'] = true;
Expand Down

0 comments on commit 022375c

Please sign in to comment.