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)