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:
@ -6,17 +6,18 @@ App.Presenters.LogoutPresenter = function(
|
||||
topNavigationPresenter,
|
||||
messagePresenter,
|
||||
auth,
|
||||
promise,
|
||||
router) {
|
||||
|
||||
var $messages = jQuery('#content');
|
||||
|
||||
function init() {
|
||||
topNavigationPresenter.select('logout');
|
||||
auth.logout().then(function() {
|
||||
promise.wait(auth.logout()).then(function() {
|
||||
$messages.empty();
|
||||
var $messageDiv = messagePresenter.showInfo($messages, 'Logged out. <a href="">Back to main page</a>');
|
||||
$messageDiv.find('a').click(mainPageLinkClicked);
|
||||
}).catch(function(response) {
|
||||
}).fail(function(response) {
|
||||
messagePresenter.showError($messages, response.json && response.json.error || response);
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user