From bc9a36e24ac6754e038dbf5e0914ac304ad03d47 Mon Sep 17 00:00:00 2001 From: Janis M Date: Sun, 3 Apr 2022 21:00:26 +0200 Subject: [PATCH] Update register.js --- static/js/register.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/static/js/register.js b/static/js/register.js index a782746..67ba222 100644 --- a/static/js/register.js +++ b/static/js/register.js @@ -310,10 +310,11 @@ function submitForm(){ data : formObj, success: function(data) { - if(data == "0"){ - window.location.href = "/login"; - }else{ + if(data != "0"){ handleError(data); + + }else{ + window.location.href = "/login" } }, error: function (jqXHR, textStatus, errorThrown)