diff --git a/public/static/js/login.js b/public/static/js/login.js index 0297b14..62e4a61 100644 --- a/public/static/js/login.js +++ b/public/static/js/login.js @@ -11,8 +11,6 @@ var xhr = new XMLHttpRequest(); xhr.responseType = 'json'; xhr.onload = function () { - document.getElementById('loading').style.visibility = 'hidden'; - if (this.response.error) { var errorText; switch (this.response.error) { @@ -24,6 +22,8 @@ break; } + document.getElementById('loading').style.visibility = 'hidden'; + var loginFormError = document.getElementById('loginFormError'); loginFormError.style.display = 'block'; loginFormError.innerHTML = errorText;