Auto polyfill overwrites native promise in Edge
gzhelev opened this issue · comments
gzhelev commented
I am using the auto polyfill in a typescript project and came across that the polyfill function overwrites the native implementation of Edge`s Promise.
The problem comes from the [object Promise]
condition. Seems in Edge the result in promiseToString is [object Object]
var P = local.Promise;
if (P) {
var promiseToString = null;
try {
promiseToString = Object.prototype.toString.call(P.resolve());
} catch (e) {
// silently ignored
}
if (promiseToString === '[object Promise]' && !P.cast) {
return;
}
}
Is this intentionally because I have not came accors a problem with Edge`s promises.
Stefan Penner commented
The problem comes from the [object Promise] condition. Seems in Edge the result in promiseToString is [object Object]
Seems like edge needs to fix ^