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
in Chrome print out BOTH my own console.log('handled error');AND the internal console.error('Unhandled promise rejection'); message. It seems to be somewhat flaky, and it almost always works when the devtools are open, but if you run that code in a standalone file with just core-js, and open devtools after running it, you'll see the error.
Obviously this code is really roundabout, but this came up for me in Jasmine because of code like
waits(500);
waits(500);
runs(function(){
// Some normal code that happens to create a promise chain like the one above.
});
I did some testing on my own machine by splitting out the core-js code and just using straight JS:
when I have devtools closed, which I think is making the promise code process the rejection in the wrong order.
The text was updated successfully, but these errors were encountered:
zloirock
changed the title
Nested setTimeout calls cause invalid Promise behavior in Chrome
Nested setTimeout calls cause invalid Promise unhandled rejection message
Jul 1, 2015
Came across this when upgrading to Babel 5, picking up core-js 0.9.18, causing us to switch from Chrome promises to polyfilled promises.
There appears to be some very strange
setTimeout
/postMessage
nesting behavior. I'm seeingin Chrome print out BOTH my own
console.log('handled error');
AND the internalconsole.error('Unhandled promise rejection');
message. It seems to be somewhat flaky, and it almost always works when the devtools are open, but if you run that code in a standalone file with just core-js, and open devtools after running it, you'll see the error.Obviously this code is really roundabout, but this came up for me in Jasmine because of code like
I did some testing on my own machine by splitting out the core-js code and just using straight JS:
prints
when I have devtools closed, which I think is making the promise code process the rejection in the wrong order.
The text was updated successfully, but these errors were encountered: