Skip to content

Commit

Permalink
fix(tabs): check if the subscription is defined before unsubscribe (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelss95 authored and jelbourn committed Jul 13, 2017
1 parent f57d00b commit 0eedb5f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/tabs/tab-nav-bar/tab-nav-bar.ts
Expand Up @@ -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. */
Expand Down

0 comments on commit 0eedb5f

Please sign in to comment.