diff options
-rw-r--r-- | webapp/components/create_post.jsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/webapp/components/create_post.jsx b/webapp/components/create_post.jsx index 0c2b8d644..c9b796107 100644 --- a/webapp/components/create_post.jsx +++ b/webapp/components/create_post.jsx @@ -120,13 +120,15 @@ export default class CreatePost extends React.Component { this.setState({submitting: true, serverError: null}); if (post.message.indexOf('/') === 0) { + PostStore.storeDraft(this.state.channelId, null); + this.setState({messageText: '', postError: null, previews: []}); + ChannelActions.executeCommand( this.state.channelId, post.message, false, (data) => { - PostStore.storeDraft(this.state.channelId, null); - this.setState({messageText: '', submitting: false, postError: null, previews: [], serverError: null}); + this.setState({submitting: false}); if (data.goto_location && data.goto_location.length > 0) { browserHistory.push(data.goto_location); |