mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
Fixed promises and its race conditions
This commit is contained in:
@ -86,7 +86,9 @@ App.Auth = function(_, jQuery, util, api, appState, promise) {
|
||||
return promise.make(function(resolve, reject) {
|
||||
jQuery.removeCookie('auth');
|
||||
appState.set('loginToken', null);
|
||||
return loginAnonymous().then(resolve).fail(reject);
|
||||
return promise.wait(loginAnonymous())
|
||||
.then(resolve)
|
||||
.fail(reject);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user