فهرست منبع

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

Antoine du Hamel 3 سال پیش
والد
کامیت
066008ef41
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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
     }