From e2733a27c4d8844c3997d051267f15b3a1f45714 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 2 Dec 2019 10:06:58 +0000 Subject: [PATCH] add null-guard Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/rooms/RoomTile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/rooms/RoomTile.js b/src/components/views/rooms/RoomTile.js index 3095981ccb..8214ffc71b 100644 --- a/src/components/views/rooms/RoomTile.js +++ b/src/components/views/rooms/RoomTile.js @@ -382,7 +382,7 @@ module.exports = createReactClass({ } let contextMenu; - if (this.state.menuDisplayed) { + if (this.state.menuDisplayed && this._contextMenuButton.current) { const elementRect = this._contextMenuButton.current.getBoundingClientRect(); const RoomTileContextMenu = sdk.getComponent('context_menus.RoomTileContextMenu'); contextMenu = (