Remove usage of finally

See flarum/core@60d78ce
This commit is contained in:
Toby Zerner 2016-01-19 18:58:15 +10:30
parent 88a06b1843
commit c52d32fbd0
3 changed files with 6 additions and 4 deletions
extensions/flags/js/forum

@ -322,7 +322,7 @@ System.register('flarum/flags/components/FlagList', ['flarum/Component', 'flarum
app.cache.flags = flags.sort(function (a, b) {
return b.time() - a.time();
});
})['finally'](function () {
})['catch'](function () {}).then(function () {
_this.loading = false;
m.redraw();
});
@ -498,7 +498,7 @@ System.register('flarum/flags/components/FlagPostModal', ['flarum/components/Mod
}
}).then(function () {
return _this.success = true;
})['finally'](this.loaded.bind(this));
})['catch'](function () {}).then(this.loaded.bind(this));
}
}]);
return FlagPostModal;

@ -75,7 +75,8 @@ export default class FlagList extends Component {
app.session.user.pushAttributes({newFlagsCount: 0});
app.cache.flags = flags.sort((a, b) => b.time() - a.time());
})
.finally(() => {
.catch(() => {})
.then(() => {
this.loading = false;
m.redraw();
});

@ -100,6 +100,7 @@ export default class FlagPostModal extends Modal {
}
})
.then(() => this.success = true)
.finally(this.loaded.bind(this));
.catch(() => {})
.then(this.loaded.bind(this));
}
}