From 6e2f1df108e3489103bca2e52c2362316a1bee86 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Tue, 8 Nov 2022 18:48:52 -0600 Subject: [PATCH] Bug fix --- src/main/resources/public/js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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!";