Skip to content

Commit

Permalink
fix(modal): Call hideModal in ngOnDestroy if modal is shown (#1038)
Browse files Browse the repository at this point in the history
fixes #853, fixes #1051, closes #1052
  • Loading branch information
Martin Cavoj authored and valorkin committed Oct 4, 2016
1 parent 26d9209 commit b38db2a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/modal/modal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ export class ModalDirective implements AfterViewInit, OnDestroy {
// this._element = null
// this._dialog = null
// this._backdrop = null
if (this._isShown) {
this._isShown = false;
this.hideModal();
}
this._isShown = void 0;
this.isBodyOverflowing = void 0;
this.originalBodyPadding = void 0;
Expand Down

0 comments on commit b38db2a

Please sign in to comment.