From f9385b455a1be6598dca926935fc00211cf0df36 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 5 Nov 2015 13:27:03 +0000 Subject: [PATCH] Don't try to send read receipts if the room is null --- src/controllers/organisms/RoomView.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/controllers/organisms/RoomView.js b/src/controllers/organisms/RoomView.js index 2dc9e1bf26..7ab59b497a 100644 --- a/src/controllers/organisms/RoomView.js +++ b/src/controllers/organisms/RoomView.js @@ -468,6 +468,7 @@ module.exports = { }, sendReadReceipt: function() { + if (!this.state.room) return; var currentReadUpToEventId = this.state.room.getEventReadUpTo(MatrixClientPeg.get().credentials.userId); var currentReadUpToEventIndex = this._indexForEventId(currentReadUpToEventId);