Skip to content

Commit

Permalink
Merge pull request #15630 from Sinan997/issue-15496
Browse files Browse the repository at this point in the history
fix: add null check to focus method parameter in dialog.ts
  • Loading branch information
cetincakiroglu authored May 30, 2024
2 parents bb303af + 5094014 commit 57a8ac1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/components/dialog/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ export class Dialog implements AfterContentInit, OnInit, OnDestroy {
return this.header !== null ? UniqueComponentId() + '_header' : null;
}

focus(focusParentElement = this.contentViewChild.nativeElement) {
focus(focusParentElement = this.contentViewChild?.nativeElement) {
let focusable = DomHandler.getFocusableElement(focusParentElement, '[autofocus]');
if (focusable) {
this.zone.runOutsideAngular(() => {
Expand Down

0 comments on commit 57a8ac1

Please sign in to comment.