Skip to content

Commit

Permalink
Merge pull request #10911 from LorenzSLA/patch-1
Browse files Browse the repository at this point in the history
Fixed #10909 - TypeError: Cannot read properties of undefined (reading 'classList') at Function.addClass
  • Loading branch information
yigitfindikli committed Dec 3, 2021
2 parents 755c0c3 + 3fc1510 commit bef724a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/components/dialog/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ export class Dialog implements AfterContentInit,OnInit,OnDestroy {
break;

case 'void':
if (this.modal) {
if (this.wrapper && this.modal) {
DomHandler.addClass(this.wrapper, 'p-component-overlay-leave');
}
break;
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/dynamicdialog/dynamicdialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class DynamicDialogComponent implements AfterViewInit, OnDestroy {
break;

case 'void':
if (this.config.modal !== false) {
if (this.wrapper && this.config.modal !== false) {
DomHandler.addClass(this.wrapper, 'p-component-overlay-leave');
}
break;
Expand Down

0 comments on commit bef724a

Please sign in to comment.