Skip to content

Commit

Permalink
Fix FileList usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Oct 18, 2023
1 parent 0946768 commit 600e7b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/src/utils/upload-queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export class UploadQueue {
// Add new files to upload queue
add(files) {
if (files && files.length && !this.isRunning) {
files.forEach((file) => {
// files is a FileList which is not an array, convert to iterate.
Array.from(files).forEach((file) => {
const fileSetKey = file.name + file.size; // Concat name and size to create a "file signature".
if (file.mode === "new" || !this.fileSet.has(fileSetKey)) {
this.fileSet.add(fileSetKey);
Expand Down

0 comments on commit 600e7b2

Please sign in to comment.