mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(tabs): check if the subscription is defined before unsubscribe (#5667)
This commit is contained in:
committed by
Jeremy Elbourn
parent
f57d00b563
commit
0eedb5f800
@@ -96,7 +96,10 @@ export class MdTabNav implements AfterContentInit, OnDestroy {
|
||||
|
||||
ngOnDestroy() {
|
||||
this._onDestroy.next();
|
||||
this._resizeSubscription.unsubscribe();
|
||||
|
||||
if (this._resizeSubscription) {
|
||||
this._resizeSubscription.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
/** Aligns the ink bar to the active link. */
|
||||
|
||||
Reference in New Issue
Block a user