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

Commit 6df5f93

Browse files
committed
fix: throw if trying to load zone more then once.
1 parent 7b9a00c commit 6df5f93

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: lib/zone.ts

+3
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,9 @@ type AmbientZone = Zone;
492492
type AmbientZoneDelegate = ZoneDelegate;
493493

494494
const Zone: ZoneType = (function(global: any) {
495+
if (global.Zone) {
496+
throw new Error('Zone already loaded.');
497+
}
495498
class Zone implements AmbientZone {
496499
static __symbol__: (name: string) => string = __symbol__;
497500

0 commit comments

Comments
 (0)