summaryrefslogtreecommitdiffstats
path: root/web/react/components/sidebar.jsx
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2016-02-01 08:44:50 -0800
committer=Corey Hulen <corey@hulen.com>2016-02-01 08:44:50 -0800
commit2487d561cd84eeb17c757bb4ee86ff007820da62 (patch)
tree20c0df8771d070df187d6b403302e7c91ad315b6 /web/react/components/sidebar.jsx
parent1006e99859d65094d2a7818781faa47bf2eab2a5 (diff)
parent1543be8a06748d1b191c5806661844fcee7678c8 (diff)
downloadchat-2487d561cd84eeb17c757bb4ee86ff007820da62.tar.gz
chat-2487d561cd84eeb17c757bb4ee86ff007820da62.tar.bz2
chat-2487d561cd84eeb17c757bb4ee86ff007820da62.zip
Merge branch 'master' into fix-email
Diffstat (limited to 'web/react/components/sidebar.jsx')
-rw-r--r--web/react/components/sidebar.jsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx
index 33ef8a851..14790fbec 100644
--- a/web/react/components/sidebar.jsx
+++ b/web/react/components/sidebar.jsx
@@ -185,7 +185,10 @@ export default class Sidebar extends React.Component {
let currentChannelName = channel.display_name;
if (channel.type === 'D') {
- currentChannelName = Utils.getDirectTeammate(channel.id).username;
+ const teammate = Utils.getDirectTeammate(channel.id);
+ if (teammate != null) {
+ currentChannelName = teammate.username;
+ }
}
const unread = this.getTotalUnreadCount();