-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vue.config.errorHandler called twice when I return a rejected Promise from a handler of a component event #9511
Closed
jfgodoy opened this issue
Feb 17, 2019
· 2 comments
· Fixed by #9526, mariazevedo88/hash-generator-js#6, tghelere/valorize-vidas#3, tghelere/DeliVuery#15 or tghelere/vue-tetris#1
Closed
Vue.config.errorHandler called twice when I return a rejected Promise from a handler of a component event #9511
jfgodoy opened this issue
Feb 17, 2019
· 2 comments
· Fixed by #9526, mariazevedo88/hash-generator-js#6, tghelere/valorize-vidas#3, tghelere/DeliVuery#15 or tghelere/vue-tetris#1
Labels
Comments
13 tasks
@jfgodoy try using the async keyword with the promise, and lets see if it works for you. |
hi @marcus-hiles, with async I have the same problem. Only a synchronous throw works |
yyx990803
pushed a commit
that referenced
this issue
Feb 21, 2019
This was referenced Aug 29, 2019
This was referenced Sep 22, 2019
Lostlover
pushed a commit
to Lostlover/vue
that referenced
this issue
Dec 10, 2019
* fix(vuejs#9511): avoid promise catch multiple times * fix(vuejs#9511): add a test case for util/error/invokeWithErrorHandling * fix(vuejs#9511): update test case for util/error/invokeWithErrorHandling
This was referenced Jan 20, 2020
This was referenced Feb 24, 2020
This was referenced Mar 4, 2020
This was referenced Apr 15, 2020
This was referenced May 4, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
2.6.6
Reproduction link
https://codepen.io/anon/pen/qgQYra?editors=1011
Steps to reproduce
The problem seems to happen when I handle an event emitted from a component and return a rejected promise. To see the problem in action, open the codepen link, click the button and you will see in the console two logs of the same error, which means the Vue.config.errorHandler was called twice.
What is expected?
I expect the errrorHandler called once.
What is actually happening?
the errorHandler function is called twice.
The text was updated successfully, but these errors were encountered: