Merge pull request #1412 from mattermost/plt-1089

PLT-1089 Fix profile not loading in RHS on refresh
Этот коммит содержится в:
Corey Hulen
2015-11-12 10:12:58 -08:00
родитель b6049721f9 83d34dcc6c
Коммит 931f4f764c
2 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

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

Просмотреть файл

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