aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ReplyForm.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ReplyForm.js b/src/ReplyForm.js
index 33b33a0..48be8e8 100644
--- a/src/ReplyForm.js
+++ b/src/ReplyForm.js
@@ -73,7 +73,9 @@ class ReplyForm extends Component {
return response.json();
})
.then(resource => {
- this.setState({ replyRes: resource, message: "" });
+ if (resource.state === "success") {
+ this.setState({ replyRes: resource, message: "" });
+ }
});
}
);