summaryrefslogtreecommitdiffstats
path: root/web/react/components/sidebar.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/sidebar.jsx')
-rw-r--r--web/react/components/sidebar.jsx3
1 files changed, 3 insertions, 0 deletions
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;