summaryrefslogtreecommitdiffstats
path: root/web/react/components/create_post.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/create_post.jsx')
-rw-r--r--web/react/components/create_post.jsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/web/react/components/create_post.jsx b/web/react/components/create_post.jsx
index 9d7a19554..48d28ad6a 100644
--- a/web/react/components/create_post.jsx
+++ b/web/react/components/create_post.jsx
@@ -262,9 +262,7 @@ class CreatePost extends React.Component {
message = err.message;
}
- if (clientId === -1) {
- this.setState({serverError: message});
- } else {
+ if (clientId !== -1) {
const draft = PostStore.getDraft(this.state.channelId);
const index = draft.uploadsInProgress.indexOf(clientId);
@@ -274,8 +272,10 @@ class CreatePost extends React.Component {
PostStore.storeDraft(this.state.channelId, draft);
- this.setState({uploadsInProgress: draft.uploadsInProgress, serverError: message});
+ this.setState({uploadsInProgress: draft.uploadsInProgress});
}
+
+ this.setState({serverError: message});
}
removePreview(id) {
const previews = Object.assign([], this.state.previews);