We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c36c0bc commit 5290173Copy full SHA for 5290173
lib/zone.ts
@@ -952,7 +952,14 @@ const Zone: ZoneType = (function(global: any) {
952
const symbolPromise = __symbol__('Promise');
953
const symbolThen = __symbol__('then');
954
955
- let _currentZoneFrame = new ZoneFrame(null, new Zone(null, null));
+ const symbolRootZoneSpec = '__rootZoneSpec__';
956
+ let rootZone: Zone = new Zone(null, null);
957
+ if (global[symbolRootZoneSpec]) {
958
+ rootZone = <Zone>rootZone.fork(global[symbolRootZoneSpec]);
959
+ delete global[symbolRootZoneSpec];
960
+ }
961
+
962
+ let _currentZoneFrame = new ZoneFrame(null, rootZone);
963
let _currentTask: Task = null;
964
let _microTaskQueue: Task[] = [];
965
let _isDrainingMicrotaskQueue: boolean = false;
0 commit comments