Merge pull request #1335 from mattermost/triple-dot-fix

Fix user profile never updating properly
This commit is contained in:
Joram Wilander
2015-11-06 10:36:46 -05:00

View File

@@ -41,7 +41,7 @@ export default class UserProfile extends React.Component {
UserStore.removeChangeListener(this.onChange);
}
onChange(userId) {
if (userId === this.props.userId) {
if (!userId || userId === this.props.userId) {
var newState = this.getStateFromStores(this.props.userId);
if (!Utils.areStatesEqual(newState, this.state)) {
this.setState(newState);