Clarify order of operations

Semantically, it makes more sense to do `getFile` before `clearForm` even though
it seems to work either way.
This commit is contained in:
Daniel Gasienica 2018-02-15 17:34:40 -05:00
parent f9d4cfb2ba
commit 329036e59c
1 changed files with 2 additions and 1 deletions

View File

@ -192,8 +192,9 @@
/* jshint ignore:start */
getFiles() {
const files = this.file ? [this.file] : Array.from(this.$input.prop('files'));
const promise = Promise.all(files.map(file => this.getFile(file)));
this.clearForm();
return Promise.all(files.map(file => this.getFile(file)));
return promise;
},
getFile(rawFile) {