TypeError: Cannot read property 'state' of undefined
Closed this issue · 0 comments
vickieallen-certua commented
Hi,
We've got this all working lovely for our use case now but it appears there are some situations where we don't have 'extras' in getCurrentNavigation() which is throwing the following console error.
Everything still works, I've fixed locally by null checking as follows:
isFromPlatform(): boolean {
return this.router.getCurrentNavigation()?.extras?.state?.fromPlatform;
}
Please could you update the package to do the same? @kelvindart-certua has raised a PR to do this :)