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
Indeed, it seems in modern browser implementations global.dispatchEvent(event); calls the window.onunhandledrejection callback if the event type is unhandledrejection.
Two lines after, if (handler = global['on' + name]) handler(event); calls the exact same callback, as global == window and 'on' + name == onunhandledrejection.
Did I miss something? Is it a core-js bug?
The text was updated successfully, but these errors were encountered:
I close the issue because this might have been caused by a hack we had to force usage of core-js Promise polyfill even on modern Browsers (delete window.Promise;).
Hi, in a browser environment, we have a callback defined as:
window.onunhandledrejection = ...
In case of unhandled promise rejection, our callback is called twice.
We inspected core-js source code and the problem seems to be in
es.promise.js
:Indeed, it seems in modern browser implementations
global.dispatchEvent(event);
calls thewindow.onunhandledrejection
callback if the event type isunhandledrejection
.Two lines after,
if (handler = global['on' + name]) handler(event);
calls the exact same callback, asglobal == window
and'on' + name == onunhandledrejection
.Did I miss something? Is it a
core-js
bug?The text was updated successfully, but these errors were encountered: