Fix pending upload count not being decremented on error (#12499)
The arguments were passed to the wrong function… also, there is no need to have a conditional decrementation: failure to upload means we marked an upload as pending, in all cases.
This commit is contained in:
parent
07da35c17c
commit
667708f5b0
2 changed files with 3 additions and 4 deletions
|
@ -236,7 +236,7 @@ export function uploadCompose(files) {
|
|||
dispatch(uploadComposeProgress(progress.reduce((a, v) => a + v, 0), total));
|
||||
},
|
||||
}).then(({ data }) => dispatch(uploadComposeSuccess(data, f)));
|
||||
}).catch(error => dispatch(uploadComposeFail(error, true)));
|
||||
}).catch(error => dispatch(uploadComposeFail(error)));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -267,11 +267,10 @@ export function changeUploadComposeSuccess(media) {
|
|||
};
|
||||
};
|
||||
|
||||
export function changeUploadComposeFail(error, decrement = false) {
|
||||
export function changeUploadComposeFail(error) {
|
||||
return {
|
||||
type: COMPOSE_UPLOAD_CHANGE_FAIL,
|
||||
error: error,
|
||||
decrement: decrement,
|
||||
skipLoading: true,
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue