summaryrefslogtreecommitdiffstats
path: root/webapp/components/popover_list_members.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-03-31 11:10:57 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2016-03-31 11:10:57 -0400
commit307c16df5f134f687a669f0efe0bf9bcb1c27437 (patch)
treed17de03b3a6f80a9be204965ff8685d2916f04ee /webapp/components/popover_list_members.jsx
parent803b58c2d41f74b852f6247472d415e1d7103108 (diff)
downloadchat-307c16df5f134f687a669f0efe0bf9bcb1c27437.tar.gz
chat-307c16df5f134f687a669f0efe0bf9bcb1c27437.tar.bz2
chat-307c16df5f134f687a669f0efe0bf9bcb1c27437.zip
Fixed errors when joining a channel that doesn't exist yet
Diffstat (limited to 'webapp/components/popover_list_members.jsx')
-rw-r--r--webapp/components/popover_list_members.jsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/webapp/components/popover_list_members.jsx b/webapp/components/popover_list_members.jsx
index cd583e4c3..f21b8ee1c 100644
--- a/webapp/components/popover_list_members.jsx
+++ b/webapp/components/popover_list_members.jsx
@@ -57,7 +57,11 @@ export default class PopoverListMembers extends React.Component {
const members = this.props.members;
const teamMembers = UserStore.getProfilesUsernameMap();
const currentUserId = UserStore.getCurrentId();
- const ch = ChannelStore.getCurrent();
+ const ch = ChannelStore.get(this.props.channelId);
+
+ if (!ch) {
+ return null;
+ }
if (members && teamMembers) {
members.sort((a, b) => {