Don't try to send read receipts if the room is null

This commit is contained in:
David Baker 2015-11-05 13:27:03 +00:00
parent 86ef0e762e
commit f9385b455a

View file

@ -468,6 +468,7 @@ module.exports = {
}, },
sendReadReceipt: function() { sendReadReceipt: function() {
if (!this.state.room) return;
var currentReadUpToEventId = this.state.room.getEventReadUpTo(MatrixClientPeg.get().credentials.userId); var currentReadUpToEventId = this.state.room.getEventReadUpTo(MatrixClientPeg.get().credentials.userId);
var currentReadUpToEventIndex = this._indexForEventId(currentReadUpToEventId); var currentReadUpToEventIndex = this._indexForEventId(currentReadUpToEventId);