Browse Source

Sender can be null, so null check.

pull/997/head
David Baker 7 years ago
parent
commit
55c7c08ac2
  1. 2
      src/components/structures/RoomSubList.js

2
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();
}

Loading…
Cancel
Save