More coherent use of await.
This commit is contained in:
parent
0b94d83129
commit
5b6433cb1c
1 changed files with 7 additions and 9 deletions
|
|
@ -145,17 +145,15 @@ export default {
|
||||||
|
|
||||||
this.isImageProcessing = true;
|
this.isImageProcessing = true;
|
||||||
|
|
||||||
await this.imageQuestionSubmitHandler(file)
|
try {
|
||||||
.then(async (response) => {
|
this.value = await this.imageQuestionSubmitHandler(file);
|
||||||
this.value = response;
|
|
||||||
|
|
||||||
await this.$nextTick();
|
await this.$nextTick();
|
||||||
|
|
||||||
document.getElementById(this.inputId).dispatchEvent(new Event("change"));
|
document.getElementById(this.inputId).dispatchEvent(new Event("change"));
|
||||||
})
|
} catch (error) {
|
||||||
.catch((error) => {
|
this.$emit("imageLookupError");
|
||||||
this.$emit("imageLookupError");
|
}
|
||||||
});
|
|
||||||
|
|
||||||
this.isImageProcessing = false;
|
this.isImageProcessing = false;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue