diff --git a/abstract/UploaderBlock.js b/abstract/UploaderBlock.js index 1498fb64..1a78b901 100644 --- a/abstract/UploaderBlock.js +++ b/abstract/UploaderBlock.js @@ -430,7 +430,7 @@ export class UploaderBlock extends ActivityBlock { let errorItems = uploadCollection.findItems((entry) => { return entry.getValue('errors').length > 0; }); - if (errorItems.length === 0 && uploadCollection.size === loadedItems.length) { + if (uploadCollection.size > 0 && errorItems.length === 0 && uploadCollection.size === loadedItems.length) { this.emit( EventType.COMMON_UPLOAD_SUCCESS, /** @type {import('../types').OutputCollectionState<'success'>} */ (this.getOutputCollectionState()), diff --git a/abstract/buildOutputCollectionState.js b/abstract/buildOutputCollectionState.js index f49b5ccb..9ae9f478 100644 --- a/abstract/buildOutputCollectionState.js +++ b/abstract/buildOutputCollectionState.js @@ -75,7 +75,11 @@ export function buildOutputCollectionState(uploaderBlock) { }, isSuccess: () => { - return state.errors.length === 0 && state.successEntries.length === state.allEntries.length; + return ( + state.allEntries.length > 0 && + state.errors.length === 0 && + state.successEntries.length === state.allEntries.length + ); }, isUploading: () => {