-
Notifications
You must be signed in to change notification settings - Fork 408
es6-promise overwrites zone.js #891
Comments
This seems to work, though not clean: var oldToString = Object.prototype.toString;
Object.prototype.toString = function () {
if (this instanceof Promise) {
return '[object Promise]';
}
return oldToString.call(this);
}; Maybe this could be added to zone.js so other polyfills won't overwrite? |
Or perhaps Zone.js could make |
@josephliccini , it seems duplicate with #499, I will check the behavior later. |
This one seems fixed, and works great for There is one issue I am seeing, but it's not affecting me but may be good for you to know. I did a test to see what would happen with My code has this now: import 'zone.js';
import 'core-js/es6/promise'; And before bootstrap I get this error:
|
@josephliccini , thanks for the information, I will check this error. |
…, and reduce zone.js size
…, and reduce zone.js size
@JiaLiPassion thanks I am excited to try in next release :) |
Our app is not working on IE11 due to this issue, using version 0.8.18. |
any update on this? |
@goyalvarun601 , this one have been merged, please wait for the next release. |
thanks @JiaLiPassion , when is the next release? |
@goyalvarun601 , I am not sure, please wait for a while. |
I am also interested in when this is resolved. |
The same is at my side. What is the approximate date for a new release ? |
for now, please update your "zone.js": "https://github.com/angular/zone.js.git" |
next release? when's that |
I am still getting the same error using "https://github.com/angular/zone.js.git".
Did it solve anyone else's issue? |
The zip doesn't have the updated dist/zone.js |
@goyalvarun601 , you are right, I used the old version, please use this one. |
thanks @JiaLiPassion |
@JiaLiPassion Can you push dist/zone.js to master or another branch? I can use the zip locally but I can't deploy anywhere. |
@goyalvarun601 , sure, you can use my branch, https://github.com/JiaLiPassion/zone.js/tree/some-fix |
@JiaLiPassion The branch doesn't have the updated dist/zone.js |
@goyalvarun601 , please use this one, https://github.com/JiaLiPassion/zone.js/tree/issue-891 |
Thank you. This works. |
thanks @JiaLiPassion it works also for me |
@jdespatis , it has been merged, but I am not sure when there will be a new version. |
nice news @JiaLiPassion , but strangely, if I use your branch in my package.json: but when using zone.js master branch, the problem with NativePromise still exists Maybe I'm doing something wrong, or maybe your branch contains more than the fix committed in zone.js ? |
@jdespatis , the content are the same between my branch and |
ok thanks for your feedback @JiaLiPassion ! |
I am not sure exactly which library is exactly responsible for the issue, but if one looks at this line:
https://github.com/stefanpenner/es6-promise/blob/a5838bd94a76e31ad80ac1685bcd0dbc3d8ce963/dist/es6-promise.js#L1133-L1144
One can see that they are expecting
Object.prototype.toString.call(window.Promise.resolve())
to be[object Promise]
, butzone.js
gives[object Object]
So, I am wondering, should
es6-promise
(coming from another widget hosted on our page served over their CDN) look for[object Object]
, or should zone.js have[object Promise]
for thistoString()
The text was updated successfully, but these errors were encountered: