Skip to content

Commit

Permalink
fixed #1947 - Dialog can't close when you press ESC key
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Apr 12, 2021
1 parent 1ec6e22 commit db6ce1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/dialog/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ export class Dialog extends Component {
if (currentTarget && currentTarget.primeDialogParams) {
let params = currentTarget.primeDialogParams;
let paramLength = params.length;
let dialogId = params[paramLength - 1].id;
let dialogId = params[paramLength - 1] ? params[paramLength - 1].id : undefined;

if (dialogId === this.state.id) {
let dialog = document.getElementById(dialogId);
Expand Down

0 comments on commit db6ce1b

Please sign in to comment.