I'm building an app using angular2, and hit a problem when I included a library using this shim. Angular2 overrides the browser's Promise with its own implementation (ZoneAwarePromise). This causes a problem in https://github.com/stefanpenner/es6-promise/blob/master/lib/es6-promise/polyfill.js#L21, where the toString returns [object Function] instead of [object Promise].
This causes the polyfill to trigger even though there was a Promise implementation available. Would it be possible to weaken the check to accept non-native Promise implementations? (I can make a PR, just want to make sure you're ok with this change before-hand).
(Currently have a workaround in place in my code: store the Promise object in a variable before including the external library, and restore it afterwards)
Hey,
I'm building an app using angular2, and hit a problem when I included a library using this shim. Angular2 overrides the browser's Promise with its own implementation (ZoneAwarePromise). This causes a problem in https://github.com/stefanpenner/es6-promise/blob/master/lib/es6-promise/polyfill.js#L21, where the toString returns
[object Function]
instead of[object Promise]
.This causes the polyfill to trigger even though there was a Promise implementation available. Would it be possible to weaken the check to accept non-native Promise implementations? (I can make a PR, just want to make sure you're ok with this change before-hand).
(Currently have a workaround in place in my code: store the Promise object in a variable before including the external library, and restore it afterwards)