Null check room because those events will be emitted before the room is stored.

pull/21833/head
David Baker 2016-02-02 16:34:41 +00:00
parent 1cabe2ec37
commit b0f0d5f6d0
1 changed files with 1 additions and 0 deletions

View File

@ -385,6 +385,7 @@ module.exports = React.createClass({
this._updateTabCompleteList(this.state.room);
var room = MatrixClientPeg.get().getRoom(this.props.roomId);
if (!room) return;
var me = MatrixClientPeg.get().credentials.userId;
if (this.state.joining && room.hasMembershipState(me, "join")) {
this.setState({