diff options
Diffstat (limited to 'src/main/resources/js/login.js')
-rw-r--r-- | src/main/resources/js/login.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/resources/js/login.js b/src/main/resources/js/login.js index f4e2bce..aa991db 100644 --- a/src/main/resources/js/login.js +++ b/src/main/resources/js/login.js @@ -1,7 +1,8 @@ const tryAgain = document.getElementById("tryAgain"); const countdown = document.getElementById("counter"); -setInterval(() => { - if (Number(countdown.innerText) === 0) tryAgain.style.display = "none"; - countdown.innerText = Number(countdown.innerText) - 1; -}, 1000); +if (tryAgain !== null) + setInterval(() => { + if (Number(countdown.innerText) === 0) tryAgain.style.display = "none"; + countdown.innerText = Number(countdown.innerText) - 1; + }, 1000); |