Fix user profile never updating properly

This commit is contained in:
JoramWilander
2015-11-06 10:13:51 -05:00
parent 5359de4a71
commit 0f4f1f90e7

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