Procházet zdrojové kódy

pass files array to _checkRestrictions in _checkAndCreateFileStateObject via addFiles (#2655)

Artur Paikin před 4 roky
rodič
revize
449798d964
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      packages/@uppy/core/src/index.js

+ 2 - 1
packages/@uppy/core/src/index.js

@@ -653,7 +653,8 @@ class Uppy {
     }
 
     try {
-      this._checkRestrictions(newFile)
+      const filesArray = Object.keys(files).map(i => files[i])
+      this._checkRestrictions(newFile, filesArray)
     } catch (err) {
       this._showOrLogErrorAndThrow(err, { file: newFile })
     }