From 2eba2280d85d87b5eb59a8102002d4cec319ff64 Mon Sep 17 00:00:00 2001
From: David Baker <dave@matrix.org>
Date: Tue, 21 Jul 2015 20:34:55 -0700
Subject: [PATCH] Don't barf if we we can't get a given room ID

---
 src/controllers/organisms/MemberList.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/controllers/organisms/MemberList.js b/src/controllers/organisms/MemberList.js
index 4182934874..6962863c63 100644
--- a/src/controllers/organisms/MemberList.js
+++ b/src/controllers/organisms/MemberList.js
@@ -113,7 +113,9 @@ module.exports = {
     roomMembers: function(limit) {
         if (!this.props.roomId) return {};
         var cli = MatrixClientPeg.get();
-        var all_members = cli.getRoom(this.props.roomId).currentState.members;
+        var room = cli.getRoom(this.props.roomId);
+        if (!room) return {};
+        var all_members = room.currentState.members;
         var all_user_ids = Object.keys(all_members);
 
         all_user_ids.sort(function(userIdA, userIdB) {
-- 
GitLab