Skip to content

Commit

Permalink
fix(upload-list): do not call upload done callback on empty list
Browse files Browse the repository at this point in the history
  • Loading branch information
nd0ut committed Sep 6, 2022
1 parent f48e7f3 commit 522a8cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions blocks/UploadList/UploadList.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export class UploadList extends UploaderBlock {
addMoreBtnHidden: exact && !this.getCssData('--cfg-multiple'),
});

if (!this.getCssData('--cfg-confirm-upload') && fitCountRestrictions && allUploaded) {
if (filesCount > 0 && !this.getCssData('--cfg-confirm-upload') && fitCountRestrictions && allUploaded) {
this.$.onDone();
}
}
Expand Down Expand Up @@ -206,8 +206,8 @@ UploadList.template = /*html*/ `
<slot name="empty"><span l10n="no-files"></span></slot>
</div>
<div
class="files"
<div
class="files"
repeat="*uploadList"
repeat-item-tag="lr-file-item"></div>
Expand Down

0 comments on commit 522a8cb

Please sign in to comment.