Procházet zdrojové kódy

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

Antoine du Hamel před 3 roky
rodič
revize
066008ef41
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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
     }