summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web/react/components/user_profile.jsx2
-rw-r--r--web/react/stores/user_store.jsx4
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];
}