diff options
author | Corey Hulen <corey@hulen.com> | 2015-11-12 10:12:58 -0800 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-11-12 10:12:58 -0800 |
commit | 931f4f764cbd18f1f5189e03ece83685e4dc6ffa (patch) | |
tree | c7675c761206d4913786a54b58b8ba6c35c9440f /web | |
parent | b6049721f9a168b47b5b6b602517719277b56b07 (diff) | |
parent | 83d34dcc6c5964ed4dfc4759fe4c9683606ab7fa (diff) | |
download | chat-931f4f764cbd18f1f5189e03ece83685e4dc6ffa.tar.gz chat-931f4f764cbd18f1f5189e03ece83685e4dc6ffa.tar.bz2 chat-931f4f764cbd18f1f5189e03ece83685e4dc6ffa.zip |
Merge pull request #1412 from mattermost/plt-1089
PLT-1089 Fix profile not loading in RHS on refresh
Diffstat (limited to 'web')
-rw-r--r-- | web/react/components/user_profile.jsx | 2 | ||||
-rw-r--r-- | web/react/stores/user_store.jsx | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/web/react/components/user_profile.jsx b/web/react/components/user_profile.jsx index 8c6b1d89c..a2523ef68 100644 --- a/web/react/components/user_profile.jsx +++ b/web/react/components/user_profile.jsx @@ -29,7 +29,7 @@ export default class UserProfile extends React.Component { return {profile: {id: '0', username: '...'}}; } - return {profile: profile}; + return {profile}; } componentDidMount() { UserStore.addChangeListener(this.onChange); diff --git a/web/react/stores/user_store.jsx b/web/react/stores/user_store.jsx index 6b7d671fc..e0ecc37aa 100644 --- a/web/react/stores/user_store.jsx +++ b/web/react/stores/user_store.jsx @@ -164,6 +164,10 @@ class UserStoreClass extends EventEmitter { } getProfile(userId) { + if (userId === this.getCurrentId()) { + return this.getCurrentUser(); + } + return this.getProfiles()[userId]; } |