summaryrefslogtreecommitdiffstats
path: root/web/react/components/navbar.jsx
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-02-01 08:36:09 -0800
committerCorey Hulen <corey@hulen.com>2016-02-01 08:36:09 -0800
commit1543be8a06748d1b191c5806661844fcee7678c8 (patch)
treea93e77f7b2f36d9c6522b497a9c870aabf4f4493 /web/react/components/navbar.jsx
parenta6d2c2c2d943a88890087ccff3282481f1e44114 (diff)
parent12efe8675e5f0591308c10949174e64e42eb1f04 (diff)
downloadchat-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/navbar.jsx')
-rw-r--r--web/react/components/navbar.jsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/web/react/components/navbar.jsx b/web/react/components/navbar.jsx
index ae14fca2f..7326a9ef8 100644
--- a/web/react/components/navbar.jsx
+++ b/web/react/components/navbar.jsx
@@ -392,10 +392,14 @@ export default class Navbar extends React.Component {
} else if (channel.type === 'D') {
isDirect = true;
if (this.state.users.length > 1) {
+ let p;
if (this.state.users[0].id === currentId) {
- channelTitle = UserStore.getProfile(this.state.users[1].id).username;
+ p = UserStore.getProfile(this.state.users[1].id);
} else {
- channelTitle = UserStore.getProfile(this.state.users[0].id).username;
+ p = UserStore.getProfile(this.state.users[0].id);
+ }
+ if (p != null) {
+ channelTitle = p.username;
}
}
}