Skip to content

Commit

Permalink
Refactor #8585 to avoid using a boolean flag
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Mar 18, 2020
1 parent a22e586 commit 5051910
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/app/components/confirmdialog/confirmdialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@ export class ConfirmDialog implements OnDestroy {

preWidth: number;

isDestroyed: boolean;

_position: string = "center";

transformOptions: any = "scale(0.7)";
Expand Down Expand Up @@ -259,7 +257,7 @@ export class ConfirmDialog implements OnDestroy {
DomHandler.removeClass(document.body, 'ui-overflow-hidden');
}

if (!this.isDestroyed) {
if (this.container) {
this.cd.detectChanges();
}
}
Expand Down Expand Up @@ -351,7 +349,6 @@ export class ConfirmDialog implements OnDestroy {
}

ngOnDestroy() {
this.isDestroyed = true;
this.restoreAppend();
this.onOverlayHide();
this.subscription.unsubscribe();
Expand Down

0 comments on commit 5051910

Please sign in to comment.