0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00

Merge pull request #2710 from jaswilli/issue-2707

Fix unhandled rejected promises when using admin
This commit is contained in:
Hannah Wolfe 2014-05-08 08:01:11 +01:00
commit 33a6ea1edf

View file

@ -144,10 +144,10 @@ function updateCheckRequest() {
function updateCheckResponse(response) {
var ops = [];
ops.push(api.settings.edit.call({user: 1}, 'nextUpdateCheck', response.next_check)
ops.push(api.settings.edit.call({internal: true}, 'nextUpdateCheck', response.next_check)
.otherwise(errors.rejectError));
ops.push(api.settings.edit.call({user: 1}, 'displayUpdateNotification', response.version)
ops.push(api.settings.edit.call({internal: true}, 'displayUpdateNotification', response.version)
.otherwise(errors.rejectError));
return when.settle(ops).then(function (descriptors) {