From eab8b4b6c89f85a494be6f9017e0dbaec9fd502a Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Fri, 11 Sep 2015 14:07:06 +0100 Subject: [PATCH] Null safe access of `id` property, needed as user can be null. --- services/track-changes/app/coffee/UpdatesManager.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/track-changes/app/coffee/UpdatesManager.coffee b/services/track-changes/app/coffee/UpdatesManager.coffee index 49c2b6e1af..9bea5ba177 100644 --- a/services/track-changes/app/coffee/UpdatesManager.coffee +++ b/services/track-changes/app/coffee/UpdatesManager.coffee @@ -192,7 +192,7 @@ module.exports = UpdatesManager = # if not, add them to the users list of the earliest update userExists = false for user in earliestUpdate.meta.users - if (!user and !update.meta.user) or (user.id == update.meta.user?.id) + if (!user and !update.meta.user) or (user?.id == update.meta.user?.id) userExists = true break if !userExists