From e1168ab7cc9770ab71fda6994ee80ef0e64e15d7 Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Thu, 29 Jun 2017 16:39:13 +0200 Subject: [PLT-6847] If a message starts with a / but is not a slash command, put the text back in the input box when it fails to send (#6695) * If a message starts with a / but is not a slash command, put the text back in the input box when it fails to send * update string per review * update per review --- webapp/components/create_post.jsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'webapp') diff --git a/webapp/components/create_post.jsx b/webapp/components/create_post.jsx index 4587f3a90..e7fafc514 100644 --- a/webapp/components/create_post.jsx +++ b/webapp/components/create_post.jsx @@ -170,10 +170,11 @@ export default class CreatePost extends React.Component { if (err.sendMessage) { this.sendMessage(post); } else { - const state = {}; - state.serverError = err.message; - state.submitting = false; - this.setState({state}); + this.setState({ + serverError: err.message, + submitting: false, + message: post.message + }); } } ); -- cgit v1.2.3-1-g7c22