mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
Fixed promises on Internet Explorer
This commit is contained in:
@ -1,15 +1,15 @@
|
||||
var App = App || {};
|
||||
|
||||
App.Bootstrap = function(auth, router, util) {
|
||||
App.Bootstrap = function(auth, router, util, promise) {
|
||||
|
||||
util.initPresenter(function() { return App.DI.get('topNavigationPresenter'); });
|
||||
|
||||
auth.tryLoginFromCookie()
|
||||
promise.wait(auth.tryLoginFromCookie())
|
||||
.then(startRouting)
|
||||
.catch(function(error) {
|
||||
auth.loginAnonymous()
|
||||
.fail(function(error) {
|
||||
promise.wait(auth.loginAnonymous())
|
||||
.then(startRouting)
|
||||
.catch(function(response) {
|
||||
.fail(function(response) {
|
||||
console.log(response);
|
||||
alert('Fatal authentication error: ' + response.json.error);
|
||||
});
|
||||
|
Reference in New Issue
Block a user