Merge pull request #762 from coralproject/reply-error-fix

BUG: Console error when you reply to a comment
This commit is contained in:
Belén Curcio
2017-07-13 12:41:30 -03:00
committed by GitHub
+1 -3
View File
@@ -67,7 +67,7 @@ class CommentBox extends React.Component {
postComment(comment, 'comments')
.then(({data}) => {
this.setState({loadingState: 'success'});
this.setState({loadingState: 'success', body: ''});
const postedComment = data.createComment.comment;
// Execute postSubmit Hooks
@@ -78,8 +78,6 @@ class CommentBox extends React.Component {
if (commentPostedHandler) {
commentPostedHandler();
}
this.setState({body: ''});
})
.catch((err) => {
this.setState({loadingState: 'error'});