diff --git a/js/modal.js b/js/modal.js index 17e29af..d615c3c 100644 --- a/js/modal.js +++ b/js/modal.js @@ -10,11 +10,8 @@ function modalPage(create, width, sec, title, message, color, type, func, close, /** Verifica se é a criação da janela popup/modal */ if (create === true) { - // Obtém a div pelo ID - const modal = document.getElementById('modal-block'); - - // Remove o elemento do DOM - modal.remove(); + // Remove o modal caso já exista + document.getElementById('modal-block').remove(); var div = ''; var color_modal = '';