Merge pull request #997 from vector-im/dbkr/fix_new_room_crash
Sender can be null, so null check.
This commit is contained in:
commit
acb443537a
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ var RoomSubList = React.createClass({
|
||||||
for (var i = room.timeline.length - 1; i >= 0; --i) {
|
for (var i = room.timeline.length - 1; i >= 0; --i) {
|
||||||
var ev = room.timeline[i];
|
var ev = room.timeline[i];
|
||||||
if (Unread.eventTriggersUnreadCount(ev) ||
|
if (Unread.eventTriggersUnreadCount(ev) ||
|
||||||
ev.sender.userId === MatrixClientPeg.get().credentials.userId)
|
(ev.sender && ev.sender.userId === MatrixClientPeg.get().credentials.userId))
|
||||||
{
|
{
|
||||||
return ev.getTs();
|
return ev.getTs();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue