You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vue 3 seems to be even more careful about unhandled rejections than Vue 2. Due to the nature of the tasks, where you sometimes you do things like
awaittask.perform();if(!task.isError){}
This can be annoying.
Or maybe even when the perform function is passed directly in the template:
@submit="saveTask.perform"
It seems like Vue 3 is checking if the result is thenable and then check if the promise rejection is handled. But this internal Vue code makes the task think it's being "awaited" and it makes the task to throw. It's a catch 22.
[Vue warn]: Unhandled error during execution of component event handler ...
There was a way to prevent this in Vue 2, I'll see if if it's possible in Vue 3 too.
The text was updated successfully, but these errors were encountered:
MartinMalinda
changed the title
Unhandled rejection in Vue 3
Unhandled rejection / error in Vue 3
Oct 21, 2020
Vue 3 seems to be even more careful about unhandled rejections than Vue 2. Due to the nature of the tasks, where you sometimes you do things like
This can be annoying.
Or maybe even when the perform function is passed directly in the template:
It seems like Vue 3 is checking if the result is thenable and then check if the promise rejection is handled. But this internal Vue code makes the task think it's being "awaited" and it makes the task to throw. It's a catch 22.
There was a way to prevent this in Vue 2, I'll see if if it's possible in Vue 3 too.
The text was updated successfully, but these errors were encountered: