add null-guard
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
bfb5706b4a
commit
e2733a27c4
1 changed files with 1 additions and 1 deletions
|
@ -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 = (
|
||||
|
|
Loading…
Reference in a new issue