about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/reducers/compose.js
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-11-29 17:02:18 +0100
committerThibaut Girka <thib@sitedethib.com>2019-11-30 17:37:16 +0100
commit949b37faba4cfcefc8347432f3d55ac11452d7eb (patch)
tree170cda24b83fee14a461cfb6ce6c4af6f99fc775 /app/javascript/flavours/glitch/reducers/compose.js
parent7ce75755491f964d5679ff617297623480621c5a (diff)
[Glitch] Fix pending upload count not being decremented on error
Port 667708f5b00ee8b7795eacd9c20d29f77c8ae602 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/reducers/compose.js')
-rw-r--r--app/javascript/flavours/glitch/reducers/compose.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js
index ac826de2b..0f807790b 100644
--- a/app/javascript/flavours/glitch/reducers/compose.js
+++ b/app/javascript/flavours/glitch/reducers/compose.js
@@ -429,7 +429,7 @@ export default function compose(state = initialState, action) {
   case COMPOSE_UPLOAD_SUCCESS:
     return appendMedia(state, fromJS(action.media), action.file);
   case COMPOSE_UPLOAD_FAIL:
-    return state.set('is_uploading', false).update('pending_media_attachments', n => action.decrement ? n - 1 : n);
+    return state.set('is_uploading', false).update('pending_media_attachments', n => n - 1);
   case COMPOSE_UPLOAD_UNDO:
     return removeMedia(state, action.media_id);
   case COMPOSE_UPLOAD_PROGRESS: