Make state.members always defined

pull/21833/head
David Baker 2015-10-12 16:25:49 +01:00
parent f6d577d0c6
commit 030124a59a
1 changed files with 2 additions and 2 deletions

View File

@ -22,10 +22,10 @@ var INITIAL_LOAD_NUM_MEMBERS = 50;
module.exports = {
getInitialState: function() {
if (!this.props.roomId) return {};
if (!this.props.roomId) return { members: [] };
var cli = MatrixClientPeg.get();
var room = cli.getRoom(this.props.roomId);
if (!room) return {};
if (!room) return { members: [] };
var all_members = room.currentState.members;
this.memberDict = this.getMemberDict();