diff --git a/src/main/resources/public/js/main.js b/src/main/resources/public/js/main.js index 0baeec2..87578f3 100644 --- a/src/main/resources/public/js/main.js +++ b/src/main/resources/public/js/main.js @@ -75,8 +75,8 @@ const submitForm = () => { .then((res) => { if (!res.ok) { if (document.getElementById("errBox") == null) { - controls = document.querySelector(".pure-controls"); - errBox = document.createElement("p"); + const controls = document.querySelector(".pure-controls"); + const errBox = document.createElement("p"); errBox.setAttribute("id", "errBox"); errBox.setAttribute("style", "color:red"); errBox.innerHTML = "Short URL not valid or already in use!";