From a26145ef91197ba374d525c947984ae672cbd94d Mon Sep 17 00:00:00 2001
From: JoramWilander <jwawilander@gmail.com>
Date: Tue, 3 Nov 2015 15:11:16 -0500
Subject: Minor changes to statuses client code

---
 web/react/components/sidebar.jsx | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'web/react/components/sidebar.jsx')

diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx
index e47ba6edf..aab9919a4 100644
--- a/web/react/components/sidebar.jsx
+++ b/web/react/components/sidebar.jsx
@@ -113,6 +113,9 @@ export default class Sidebar extends React.Component {
         for (var i = 0; i < directChannels.length; i++) {
             const dm = directChannels[i];
             const teammate = Utils.getDirectTeammate(dm.id);
+            if (!teammate) {
+                continue;
+            }
 
             const member = members[dm.id];
             const msgCount = dm.total_msg_count - member.msg_count;
-- 
cgit v1.2.3-1-g7c22

