From 6488fd1284d4edd6333b4f4daefdd643cf1f89dd Mon Sep 17 00:00:00 2001 From: Simon Detheridge Date: Tue, 28 May 2019 10:15:55 +0100 Subject: [PATCH] Merge pull request #1814 from overleaf/spd-missing-callback-returns Add missing return statements to callbacks in SubscriptionGroupHandler GitOrigin-RevId: 05ff67bd8e4997fde01c6cf9f4558d3caa261590 --- .../Features/Subscription/SubscriptionGroupHandler.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/web/app/coffee/Features/Subscription/SubscriptionGroupHandler.coffee b/services/web/app/coffee/Features/Subscription/SubscriptionGroupHandler.coffee index ca7788fcc9..e378cd9c56 100644 --- a/services/web/app/coffee/Features/Subscription/SubscriptionGroupHandler.coffee +++ b/services/web/app/coffee/Features/Subscription/SubscriptionGroupHandler.coffee @@ -18,11 +18,12 @@ module.exports = SubscriptionGroupHandler = SubscriptionUpdater.removeUserFromGroup subscriptionId, userToRemove_id, callback replaceUserReferencesInGroups: (oldId, newId, callback) -> + logger.log old_id: oldId, new_id: newId, "replacing user reference in groups" Subscription.update {admin_id: oldId}, {admin_id: newId}, (error) -> - callback(error) if error? + return callback(error) if error? replaceInArray Subscription, "manager_ids", oldId, newId, (error) -> - callback(error) if error? + return callback(error) if error? replaceInArray Subscription, "member_ids", oldId, newId, callback