feat(Uploader): use before read promise resolved value (#5813)

This commit is contained in:
Pingren Nie
2020-03-12 20:52:25 +08:00
committed by GitHub
parent df877751b3
commit e96c352680
5 changed files with 49 additions and 165 deletions

View File

@@ -113,8 +113,12 @@ export default createComponent({
if (isPromise(response)) {
response
.then(() => {
this.readFile(files);
.then(data => {
if (data) {
this.readFile(data);
} else {
this.readFile(files);
}
})
.catch(this.resetInput);