The automatic polyfill fails when both 'window' and 'global' exist.
Author: RudeySHCreated Jan 2, 2019Updated Aug 17, 2021
Labelsbug
I just had some trouble with the polyfill. I'm building a browser app which has a global variable named global. This caused the polyfill to add the Promise object to my global object, instead of adding it to window. The opposite could also happen: building a Node app that has a variable named window.
Not sure if this should be fixed, though. I reckon it was probably a bad idea by me to have a global variable anyway. I renamed it to something else so I can continue to use this polyfill.
Source: stefanpenner/es6-promise