Skip to content

Commit

Permalink
Merge pull request #21 from dsl-src/master
Browse files Browse the repository at this point in the history
Fix Cannot read property 'unsubscribe' of undefined

Closes #20
  • Loading branch information
Stabzs committed May 22, 2016
2 parents 27dfc05 + 4b113f4 commit b79e4ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/toaster-container.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export class ToasterContainerComponent {
}

ngOnDestroy() {
this.addToastSubscriber.unsubscribe();
this.clearToastsSubscriber.unsubscribe();
if(this.addToastSubscriber) { this.addToastSubscriber.unsubscribe(); }
if(this.clearToastsSubscriber) { this.clearToastsSubscriber.unsubscribe(); }
}
}
}

0 comments on commit b79e4ca

Please sign in to comment.