Pārlūkot izejas kodu

@uppy/core: fix `TypeError` when file was removed (#3650)

Antoine du Hamel 3 gadi atpakaļ
vecāks
revīzija
066008ef41
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      packages/@uppy/core/src/Uppy.js

+ 1 - 1
packages/@uppy/core/src/Uppy.js

@@ -851,7 +851,7 @@ class Uppy {
   }
 
   calculateProgress (file, data) {
-    if (!this.getFile(file.id)) {
+    if (file == null || !this.getFile(file.id)) {
       this.log(`Not setting progress for a file that has been removed: ${file.id}`)
       return
     }