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

Commit

Permalink
fix: throw if trying to load zone more then once.
Browse files Browse the repository at this point in the history
  • Loading branch information
mhevery committed Aug 15, 2016
1 parent 7b9a00c commit 6df5f93
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/zone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,9 @@ type AmbientZone = Zone;
type AmbientZoneDelegate = ZoneDelegate;

const Zone: ZoneType = (function(global: any) {
if (global.Zone) {
throw new Error('Zone already loaded.');
}
class Zone implements AmbientZone {
static __symbol__: (name: string) => string = __symbol__;

Expand Down

0 comments on commit 6df5f93

Please sign in to comment.