Null safe access of id property, needed as user can be null.

This commit is contained in:
Shane Kilkelly 2015-09-11 14:07:06 +01:00
parent 0ad374556d
commit eab8b4b6c8

View file

@ -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