Skip to content

Commit

Permalink
fix(app): prevent warning when pressing esc in a dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
tuner committed May 31, 2022
1 parent 185c110 commit 7b835ae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/app/src/utils/ui/modal.js
Expand Up @@ -31,8 +31,10 @@ export function createModal(type = "default") {
const button = /** @type {HTMLButtonElement} */ (
root.querySelector(".btn-cancel")
);
button.click();
event.stopPropagation();
if (button) {
button.click();
event.stopPropagation();
}
break;
}
case "Enter": {
Expand Down

0 comments on commit 7b835ae

Please sign in to comment.