Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 5eccff6

Browse files
committed
revert promise check
1 parent 9a2ea32 commit 5eccff6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/zone.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ const Zone: ZoneType = (function(global: any) {
683683
static __symbol__: (name: string) => string = __symbol__;
684684

685685
static assertZonePatched() {
686-
if (global['Promise'] !== patchedPromise) {
686+
if (global['Promise'] !== patches['ZoneAwarePromise']) {
687687
throw new Error(
688688
'Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' +
689689
'has been overwritten.\n' +
@@ -1372,7 +1372,7 @@ const Zone: ZoneType = (function(global: any) {
13721372
if (!nativeMicroTaskQueuePromise) {
13731373
if (global[symbolPromise]) {
13741374
nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0);
1375-
} else if (_mode === 'lazy' && patchedPromise !== global['Promise']) {
1375+
} else if (_mode === 'lazy' && !monkeyPatched) {
13761376
nativeMicroTaskQueuePromise = global['Promise'].resolve(0);
13771377
}
13781378
}
@@ -1426,7 +1426,6 @@ const Zone: ZoneType = (function(global: any) {
14261426
eventTask: 'eventTask' = 'eventTask';
14271427

14281428
const patches: {[key: string]: any} = {};
1429-
let patchedPromise: any;
14301429
const delegates:
14311430
{proto: any, property: string, patched: any, origin: any, isPropertyDesc: boolean}[] = [];
14321431
let monkeyPatched = true;

0 commit comments

Comments
 (0)