From 9e91d7e8cd3a3cdfee7f4d10347f48980eeaae93 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 13 Apr 2019 19:59:48 +0200 Subject: Added support for multiple roles per user --- src/main/resources/js/login.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/resources/js/login.js') 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); -- cgit v1.2.3