Add comment about roomId potentially not being resolved following an update from RoomViewStore

pull/21833/head
Luke Barnard 2017-06-08 15:43:45 +01:00
parent e58e4db628
commit 59e649f326
1 changed files with 2 additions and 0 deletions

View File

@ -183,6 +183,8 @@ module.exports = React.createClass({
} }
this.setState(newState, () => { this.setState(newState, () => {
// At this point, this.state.roomId could be null (e.g. the alias might not
// have been resolved yet) so anything called here must handle this case.
this._onHaveRoom(); this._onHaveRoom();
this.onRoom(MatrixClientPeg.get().getRoom(this.state.roomId)); this.onRoom(MatrixClientPeg.get().getRoom(this.state.roomId));
}); });