You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use authorization component which checks if user is authorize to see protected page where I have and SimpleNotificationsComponent. In case of unauthorized attempt, the authorization component uses Router and navigates to login page. And in that case I got:
Unhandled promise rejection TypeError: Cannot read property 'unsubscribe' of undefined(…)
The listener that is trying to unregister doesn't appear to be part of the toaster component. Can you please create a small plunkr that demonstrates this behavior?
This has been published as 0.3.1-rc.1 via b88eb5a.
Please note that while coveralls reported test coverage remained at 100%, branch coverage dropped and had to be corrected in the above commit. Going forward, if you contribute, please make sure to add appropriate tests and regenerate test coverage to ensure proper coverage of all code paths and branches.
I use authorization component which checks if user is authorize to see protected page where I have and SimpleNotificationsComponent. In case of unauthorized attempt, the authorization component uses Router and navigates to login page. And in that case I got:
Unhandled promise rejection TypeError: Cannot read property 'unsubscribe' of undefined(…)
which leads to NotificationComponent and:
ngOnDestroy()
{
this.addToastSubscriber.unsubscribe()
this.clearToastsSubscriber.unsubscribe()
}
It is probably because of component not being initializes in ngOnInit.
The text was updated successfully, but these errors were encountered: