Improve the JS click event

This commit is contained in:
Narek Zakarian 2022-12-14 15:44:48 +04:00
parent 554ae57cb1
commit 2bb8ea9246
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7

View file

@ -8,7 +8,7 @@ document.addEventListener(
const clearDbConfig = config.clearDb;
jQuery(document).on('click', clearDbConfig.button, function () {
document.querySelector(clearDbConfig.button)?.addEventListener('click', function () {
const isConfirmed = confirm(clearDbConfig.confirmationMessage);
if (!isConfirmed) {
return;