polyfill() does not polyfill Promise.prototype.finally() if the environment already has a Promise implementation.

Author: shirakabaCreated Mar 13, 2018Updated Apr 5, 2019

In polyfill.js, observe line 30: https://github.com/stefanpenner/es6-promise/blob/master/lib/es6-promise/polyfill.js#L30

As I understand it, if a Promise implementation is found on the global object, then the polyfill will use the global object's Promise implementation as-is, not augmenting it with the stage 4 ES9/ES2018 feature proposal provided in this library, Promise.prototype.finally().

Is this intended behaviour, or a bug? Surely if I have polyfilled es6-promise, I should be getting at least all the advertised features of es6-promise?

Source: stefanpenner/es6-promise