7.2 ngOnDestroy needs to test this.subscription
Issue #4
resolved
ngOnDestroy() { if (this.subscription) { this.subscription.unsubscribe(); } }
Comments (2)
-
repo owner -
repo owner - changed status to resolved
- Log in to comment
Hi @invegat
Thanks for opening this issue. As far as I can tell, there should not be any case were ngOndestroy is called without a (prior) call to ngAfterViewInit which is where the subscription property is set.
Did you face a case where this.subscription was still null during ngOnDestroy?
Thanks!