You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
I am getting the error zone.js has detected that zoneawarepromise (window|global).promise has been overwritten
in my angular2 project. That happens from time to time on page reload and probably depends on connection speed. As I figured out that is caused by a conflict with gtm code. Most likely gtm script is asynchronously loading some other scripts (hot jar in my case) which can overwrite window.promise. And it does not matter where exactly these scripts were placed
The workaround which is working for me
Zone.assertZonePatched = function () {
if (global.Promise !== ZoneAwarePromise) {
global.Promise = ZoneAwarePromise;
}
};
but how safe is it?
I would be grateful for explanation and any smarter workarounds. Changing gtm code is not acceptable for me.
"zone.js": "0.7.4" (also tried v0.8.17)
The text was updated successfully, but these errors were encountered:
I am getting the error
zone.js has detected that zoneawarepromise
(window|global).promisehas been overwritten
in my angular2 project. That happens from time to time on page reload and probably depends on connection speed. As I figured out that is caused by a conflict with gtm code. Most likely gtm script is asynchronously loading some other scripts (hot jar in my case) which can overwrite
window.promise
. And it does not matter where exactly these scripts were placedThe workaround which is working for me
but how safe is it?
I would be grateful for explanation and any smarter workarounds. Changing gtm code is not acceptable for me.
"zone.js": "0.7.4"
(also tried v0.8.17)The text was updated successfully, but these errors were encountered: