Fix profile loading in RHS on refresh

This commit is contained in:
JoramWilander
2015-11-12 12:13:26 -05:00
parent 13a251a5ee
commit 83d34dcc6c
2 changed files with 5 additions and 1 deletions

View File

@@ -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);

View File

@@ -164,6 +164,10 @@ class UserStoreClass extends EventEmitter {
}
getProfile(userId) {
if (userId === this.getCurrentId()) {
return this.getCurrentUser();
}
return this.getProfiles()[userId];
}