From b5fd78a97f2c2cda60bb5632802855f67b3eb996 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Wed, 14 Jun 2017 16:50:46 +0100 Subject: [PATCH] Only attempt to peek once in the lifetime of RoomView --- src/components/structures/RoomView.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 4af17f7a1a..186aaf6f75 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -191,7 +191,9 @@ 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(); + if (initial) { + this._onHaveRoom(); + } }); },