fix(tabs): check if the subscription is defined before unsubscribe (#5667)

This commit is contained in:
Rafael Santana
2017-07-13 14:20:16 -03:00
committed by Jeremy Elbourn
parent f57d00b563
commit 0eedb5f800
+4 -1
View File
@@ -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. */