Skip to content

Commit

Permalink
Update AvatarForm
Browse files Browse the repository at this point in the history
  • Loading branch information
gocreating committed Oct 28, 2016
1 parent a8ce5c7 commit d15c247
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/common/components/forms/user/AvatarForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,22 +156,20 @@ class AvatarForm extends Component {
dispatch(setCookies({
user: json.user,
}));
this.setState({
avatarURL: newAvatarURL,
});
this.clearFileField();
});
});
}

render() {
const {
user,
handleSubmit,
pristine,
submitting,
invalid,
} = this.props;
let { avatarURL } = this.state;
let avatarURL = this.state.avatarURL || user.avatarURL;

return (
<Form onSubmit={handleSubmit(this.handleSubmit)}>
Expand Down

0 comments on commit d15c247

Please sign in to comment.