From ed0e287c946ee25bc9f1c3f281b267c6e27c5b4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Wed, 10 Jun 2020 20:22:01 +0200 Subject: [PATCH] MAPG-120 don't hide the loading when user will be redirected --- public/static/js/login.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;