Kaynağa Gözat

Dont’s use Array.from — Babel doesn’t transplie it

Artur Paikin 9 yıl önce
ebeveyn
işleme
d6cbf7a59f
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      src/plugins/DragDrop.js

+ 1 - 1
src/plugins/DragDrop.js

@@ -77,7 +77,7 @@ export default class DragDrop extends Plugin {
   handleInputChange () {
     this.core.log('All right, something selected through input...')
 
-    const newFiles = Array.from(this.input.files)
+    const newFiles = Object.keys(this.input.files).map((key) => this.input.files[key])
 
     this.core.emitter.emit('file-add', {
       plugin: this,