fix NPE
This commit is contained in:
parent
0cffd8dd84
commit
39871e52df
1 changed files with 3 additions and 1 deletions
|
@ -70,7 +70,9 @@ module.exports = React.createClass({
|
||||||
var cli = MatrixClientPeg.get();
|
var cli = MatrixClientPeg.get();
|
||||||
var room = cli.getRoom(this.props.roomId);
|
var room = cli.getRoom(this.props.roomId);
|
||||||
// FIXME: presumably we need to subscribe to some event to refresh this count when it changes?
|
// FIXME: presumably we need to subscribe to some event to refresh this count when it changes?
|
||||||
membersBadge = <div className="mx_RightPanel_headerButton_badge">{ room.getJoinedMembers().length }</div>;
|
if (room) {
|
||||||
|
membersBadge = <div className="mx_RightPanel_headerButton_badge">{ room.getJoinedMembers().length }</div>;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.roomId) {
|
if (this.props.roomId) {
|
||||||
|
|
Loading…
Reference in a new issue