From b45cc443c9e9fdf8147d354b95b6fecb31b2e7b2 Mon Sep 17 00:00:00 2001
From: Christopher Speller <crspeller@gmail.com>
Date: Wed, 2 Nov 2016 10:57:28 -0400
Subject: Avoiding javascript error when webrtc is enabled. (#4425)

---
 webapp/components/channel_header.jsx | 1 +
 1 file changed, 1 insertion(+)

(limited to 'webapp/components/channel_header.jsx')

diff --git a/webapp/components/channel_header.jsx b/webapp/components/channel_header.jsx
index b92a316ca..98c6f7947 100644
--- a/webapp/components/channel_header.jsx
+++ b/webapp/components/channel_header.jsx
@@ -84,6 +84,7 @@ export default class ChannelHeader extends React.Component {
         if (!this.state.channel ||
             !this.state.memberChannel ||
             !this.state.users ||
+            (Object.keys(this.state.users).length === 0 && this.state.channel.type === 'D') ||
             !this.state.userCount ||
             !this.state.currentUser) {
             return false;
-- 
cgit v1.2.3-1-g7c22

