From 52f3fa7fea2915d9db7d9e97f926ad544ac328c4 Mon Sep 17 00:00:00 2001 From: Renard Date: Wed, 25 Sep 2019 21:27:37 -0300 Subject: Limpiar mensaje en suceso --- src/ReplyForm.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: "" }); + } }); } ); -- cgit v1.2.1-18-gbd029