diff options
Diffstat (limited to 'share/www/script/futon.js')
-rw-r--r-- | share/www/script/futon.js | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/share/www/script/futon.js b/share/www/script/futon.js index e32e14ee0..a82269df3 100644 --- a/share/www/script/futon.js +++ b/share/www/script/futon.js @@ -85,19 +85,21 @@ function $$(node) { if (!validateUsernameAndPassword(data, callback)) return; $.couch.config({ success : function() { - doLogin(data.name, data.password, function(errors) { - if(!$.isEmptyObject(errors)) { - callback(errors); - return; - } - doSignup(data.name, null, function(errors) { - if (errors && errors.name && errors.name.indexOf && errors.name.indexOf("taken") == -1) { + setTimeout(function() { + doLogin(data.name, data.password, function(errors) { + if(!$.isEmptyObject(errors)) { callback(errors); - } else { - callback(); + return; } - }, false); - }); + doSignup(data.name, null, function(errors) { + if (errors && errors.name && errors.name.indexOf && errors.name.indexOf("taken") == -1) { + callback(errors); + } else { + callback(); + } + }, false); + }); + }, 200); } }, "admins", data.name, data.password); } |