From 96e50e134d68b958d447253de1bcf421df165831 Mon Sep 17 00:00:00 2001 From: PavelUd Date: Tue, 26 Dec 2023 23:18:16 +0500 Subject: [PATCH] fix --- js/mesages.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/mesages.js b/js/mesages.js index 9260b5e..d3cd4d1 100644 --- a/js/mesages.js +++ b/js/mesages.js @@ -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); };