Skip to content

Commit

Permalink
fix: confirmation modal not execution
Browse files Browse the repository at this point in the history
  • Loading branch information
stambolievv committed Jan 9, 2023
1 parent 35a652b commit 6361906
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ export function showModal(message) {
document.querySelector('.modal-message').textContent = message;

return new Promise(resolve => {
onChoice = (choice) => overlay.remove() && resolve(choice);
onChoice = (choice) => {
overlay.remove();
resolve(choice);
};
});
}

0 comments on commit 6361906

Please sign in to comment.