diff --git a/src/controllers/organisms/MemberList.js b/src/controllers/organisms/MemberList.js index 41829348..6962863c 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) {