summaryrefslogtreecommitdiffstats
path: root/webapp/components
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components')
-rw-r--r--webapp/components/create_post.jsx6
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);