Skip to content

Commit

Permalink
fix for batch ending condition in Uploader class (#7139)
Browse files Browse the repository at this point in the history
* fix for batch ending condition in Uploader class

* revert and condition and use gte for batchSize comparison
  • Loading branch information
VictorTomaili committed May 6, 2024
1 parent 2e9a2ef commit c043dd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/corelib/src/base/uploader.ts
Expand Up @@ -115,7 +115,7 @@ export class Uploader {
this.batch.filePaths.push(filePath);
this.batch.formData.set(this.opt.name, file, filePath);
if (!this.isMultiple() ||
(this.opt.batchSize && this.batch.filePaths.length > this.opt.batchSize)) {
(this.opt.batchSize && this.batch.filePaths.length >= this.opt.batchSize)) {
await this.endBatch();
}
}
Expand Down

0 comments on commit c043dd9

Please sign in to comment.