From 1d2d086a58f6887f91c166f98e4314ebd2fa8c95 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 13 Jul 2017 00:41:18 +0100 Subject: [PATCH] Replace q.allSettled() Bluebird doesn't have an `allSettled` method, so instead catch the exceptions and use `all`. --- src/components/views/settings/Notifications.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index e8ee543457..11ca2e39d2 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -431,7 +431,9 @@ module.exports = React.createClass({ 'global', kind, LEGACY_RULES[rule.rule_id], portLegacyActions(rule.actions) ).then( function() { return cli.deletePushRule('global', kind, rule.rule_id); - }) + }).catch( (e) => { + console.warn(`Error when porting legacy rule: ${e}`); + }); }(kind, rule)); } } @@ -440,7 +442,7 @@ module.exports = React.createClass({ if (needsUpdate.length > 0) { // If some of the rules need to be ported then wait for the porting // to happen and then fetch the rules again. - return q.allSettled(needsUpdate).then( function() { + return q.all(needsUpdate).then( function() { return cli.getPushRules(); }); } else {