Convert FileList to Array

This commit is contained in:
Daniel Gasienica
2018-02-13 16:32:24 -05:00
parent 70a6c42019
commit c08058ee4b

View File

@@ -193,7 +193,7 @@
/* eslint-enable */
/* jshint ignore:start */
getFiles() {
const files = this.file ? [this.file] : this.$input.prop('files');
const files = this.file ? [this.file] : Array.from(this.$input.prop('files'));
const promises = Promise.all(
files.map(file => this.getFile(file))
);