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); } },