diff options
author | Corey Hulen <corey@hulen.com> | 2016-02-01 08:36:09 -0800 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-02-01 08:36:09 -0800 |
commit | 1543be8a06748d1b191c5806661844fcee7678c8 (patch) | |
tree | a93e77f7b2f36d9c6522b497a9c870aabf4f4493 /web/react/components/sidebar.jsx | |
parent | a6d2c2c2d943a88890087ccff3282481f1e44114 (diff) | |
parent | 12efe8675e5f0591308c10949174e64e42eb1f04 (diff) | |
download | chat-1543be8a06748d1b191c5806661844fcee7678c8.tar.gz chat-1543be8a06748d1b191c5806661844fcee7678c8.tar.bz2 chat-1543be8a06748d1b191c5806661844fcee7678c8.zip |
Merge pull request #2037 from mattermost/plt-1862
PLT-1862 Fix console errors
Diffstat (limited to 'web/react/components/sidebar.jsx')
-rw-r--r-- | web/react/components/sidebar.jsx | 5 |
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(); |