From cd26f6331506bd9b0ee675a448cc3e7a7a267abd Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Mon, 6 Nov 2017 10:16:03 +0000 Subject: [PATCH] Do not init a group store when no groupId specified (in RightPanel), otherwise the store will happily send requests to the server for the `undefined` group. --- src/components/structures/RightPanel.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js index dedd715f9c..240a5b2efe 100644 --- a/src/components/structures/RightPanel.js +++ b/src/components/structures/RightPanel.js @@ -127,8 +127,9 @@ module.exports = React.createClass({ }, _initGroupStore(groupId) { + if (!groupId) return; this._groupStore = GroupStoreCache.getGroupStore( - this.context.matrixClient, this.props.groupId, + this.context.matrixClient, groupId, ); this._groupStore.registerListener(this.onGroupStoreUpdated); },