From 39871e52df038a022c2bf2b6a86abed7969af06a Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sat, 24 Oct 2015 20:57:05 +0100 Subject: [PATCH] fix NPE --- src/skins/vector/views/organisms/RightPanel.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/skins/vector/views/organisms/RightPanel.js b/src/skins/vector/views/organisms/RightPanel.js index bcfeba57..41978aaf 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) {