I'm learning on how to use Async/Await, and as far as I know it should wait until Await is done with executing and then go on with the code.
However, my code completely stops executing after my Await, this is my method (I'm using Vue):
async register () {
await this.form.validateFields((err, values) => {
if (err) {
return
}
alert('this gets executed if err is empty')
})
alert('this never gets get executed, why?')
}
validateFields() is a function of Vue's version of Ant Design, and validates my form input. More about it here, maybe it will help inform any of you.
So what exactly am I doing wrong here?