Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PavelUd committed Dec 26, 2023
1 parent fbc48d7 commit 96e50e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/mesages.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ function hideMessage() {
}

const showMessage = (message) => {
const button = message.querySelector('button');
const buttonElement = message.querySelector('button');
document.body.append(message);
button.addEventListener('click', onButtonElementClick);
buttonElement.addEventListener('click', onButtonElementClick);
document.addEventListener('click', onDocumentClick);
document.addEventListener('keydown', onDocumentKeydown);
};
Expand Down

0 comments on commit 96e50e1

Please sign in to comment.