Explorar o código

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

Antoine du Hamel %!s(int64=3) %!d(string=hai) anos
pai
achega
066008ef41
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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
     }