From 55c7c08ac2332844f9c57f7bb42a825c4154f687 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 23 Feb 2016 17:59:13 +0000 Subject: [PATCH] Sender can be null, so null check. --- src/components/structures/RoomSubList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js index b2292a7861..2eeec2a688 100644 --- a/src/components/structures/RoomSubList.js +++ b/src/components/structures/RoomSubList.js @@ -119,7 +119,7 @@ var RoomSubList = React.createClass({ for (var i = room.timeline.length - 1; i >= 0; --i) { var ev = room.timeline[i]; if (Unread.eventTriggersUnreadCount(ev) || - ev.sender.userId === MatrixClientPeg.get().credentials.userId) + (ev.sender && ev.sender.userId === MatrixClientPeg.get().credentials.userId)) { return ev.getTs(); }