From 59e649f326aaff78253ae40cb824f78969b3b611 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 8 Jun 2017 15:43:45 +0100 Subject: [PATCH] Add comment about roomId potentially not being resolved following an update from RoomViewStore --- src/components/structures/RoomView.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 180e6ebc89..cfa4038114 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -183,6 +183,8 @@ module.exports = React.createClass({ } 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.onRoom(MatrixClientPeg.get().getRoom(this.state.roomId)); });