diff --git a/src/skins/vector/views/organisms/RightPanel.js b/src/skins/vector/views/organisms/RightPanel.js index bcfeba57b9..41978aafb9 100644 --- a/src/skins/vector/views/organisms/RightPanel.js +++ b/src/skins/vector/views/organisms/RightPanel.js @@ -70,7 +70,9 @@ module.exports = React.createClass({ var cli = MatrixClientPeg.get(); var room = cli.getRoom(this.props.roomId); // FIXME: presumably we need to subscribe to some event to refresh this count when it changes? - membersBadge =
{ room.getJoinedMembers().length }
; + if (room) { + membersBadge =
{ room.getJoinedMembers().length }
; + } } if (this.props.roomId) {