Skip to content
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

unhandledrejectionhandler called multiple times for same error #318

Closed
cdietze opened this issue Jul 14, 2017 · 3 comments
Closed

unhandledrejectionhandler called multiple times for same error #318

cdietze opened this issue Jul 14, 2017 · 3 comments
Labels

Comments

@cdietze
Copy link

cdietze commented Jul 14, 2017

When chaining promises using then the behavior between Chrome's native onunhandledrejectionhandler and core-js' implementation differ.

Promise.reject(43).then(x => x); will invoke the handler twice in core-js and once in Chrome.
I suppose Chrome's behavior is correct.

demo

@zloirock
Copy link
Owner

zloirock commented Jul 14, 2017

In this example, we have 2 promises, so triggered 2 events. Need to check HTML spec for confirming which behaviour is correct.

@benjamingr
Copy link
Contributor

@zloirock the ES spec is ambiguous about this

@zloirock
Copy link
Owner

Fixed in core-js@2.5.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants