Ver código fonte

fix join() error

Renée Kooi 6 anos atrás
pai
commit
615581501f
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      packages/@uppy/file-input/src/index.js

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

@@ -72,6 +72,7 @@ module.exports = class FileInput extends Plugin {
     }
 
     const restrictions = this.uppy.opts.restrictions
+    const accept = restrictions.allowedFileTypes ? restrictions.allowedFileTypes.join(',') : null
 
     // empty value="" on file input, so that the input is cleared after a file is selected,
     // because Uppy will be handling the upload and so we can select same file
@@ -83,7 +84,7 @@ module.exports = class FileInput extends Plugin {
         name={this.opts.inputName}
         onchange={this.handleInputChange}
         multiple={restrictions.maxNumberOfFiles !== 1}
-        accept={restrictions.allowedFileTypes.join(',')}
+        accept={accept}
         ref={(input) => { this.input = input }}
         value="" />
       {this.opts.pretty &&