瀏覽代碼

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

Shane Kilkelly 11 年之前
父節點
當前提交
eab8b4b6c8
共有 1 個文件被更改,包括 1 次插入 和 1 次删除
  1. 1 1
      services/track-changes/app/coffee/UpdatesManager.coffee

+ 1 - 1
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