From b4a71246869e32c3c1a31a9775228832546096d8 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 9 Feb 2016 16:48:12 +0000 Subject: [PATCH] Add a null check here since room can be null and this was throwing --- src/components/views/rooms/InviteMemberList.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/views/rooms/InviteMemberList.js b/src/components/views/rooms/InviteMemberList.js index 8bad76b7ba..73ee4f7c27 100644 --- a/src/components/views/rooms/InviteMemberList.js +++ b/src/components/views/rooms/InviteMemberList.js @@ -42,9 +42,11 @@ module.exports = React.createClass({ // TODO: Keep this list bleeding-edge up-to-date. Practically speaking, // it will do for now not being updated as random new users join different // rooms as this list will be reloaded every room swap. - this._userList = MatrixClientPeg.get().getUsers().filter((u) => { - return !this._room.hasMembershipState(u.userId, "join"); - }); + if (this._room) { + this._userList = MatrixClientPeg.get().getUsers().filter((u) => { + return !this._room.hasMembershipState(u.userId, "join"); + }); + } }, onInvite: function(ev) {