forked from matrix/element-web
fix NPE
This commit is contained in:
parent
0cffd8dd84
commit
39871e52df
|
@ -70,8 +70,10 @@ 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?
|
||||||
|
if (room) {
|
||||||
membersBadge = <div className="mx_RightPanel_headerButton_badge">{ room.getJoinedMembers().length }</div>;
|
membersBadge = <div className="mx_RightPanel_headerButton_badge">{ room.getJoinedMembers().length }</div>;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.props.roomId) {
|
if (this.props.roomId) {
|
||||||
buttonGroup =
|
buttonGroup =
|
||||||
|
|
Loading…
Reference in New Issue