From 81cc30bab2f30731f48c44e63a2ee583c2e6efe4 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Thu, 28 Jan 2016 10:52:08 +0000 Subject: [PATCH] Null guard because this may not exist in the DOM. --- 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 a2a308ed5c..e2ed8231ef 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -465,7 +465,9 @@ module.exports = React.createClass({ if (this.state.room && this.state.room.getJoinedMembers().length == 1) { var inviteBox = document.getElementById("mx_SearchableEntityList_query"); setTimeout(function() { - inviteBox.focus(); + if (inviteBox) { + inviteBox.focus(); + } }, 50); } },