Skip to content

Commit

Permalink
fix(menu): check if snapshot exist before params collection
Browse files Browse the repository at this point in the history
To prevent random crashes during navigation
  • Loading branch information
Alex Malkevich committed Mar 19, 2019
1 parent 9798172 commit 83b950d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions projects/dynamic-menu/src/lib/dynamic-menu.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ export class DynamicMenuService implements OnDestroy {
}

private collectAllParams(route: ActivatedRoute): Params {
if (!route.snapshot) {
return {};
}

let params = route.snapshot.params;

route.children.forEach(
Expand Down

0 comments on commit 83b950d

Please sign in to comment.