mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 03:44:48 +00:00
feat(Uploader): use before read promise resolved value (#5813)
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user