diff --git a/src/app/broadcaster.service.spec.ts b/src/app/broadcaster.service.spec.ts index a5f8efc..69de4e8 100644 --- a/src/app/broadcaster.service.spec.ts +++ b/src/app/broadcaster.service.spec.ts @@ -11,7 +11,6 @@ describe('Service: Broadcaster service', () => { afterEach( () => { broadcaster = null; - Broadcaster.refCount = 0; }); it('Broadcaster can successfully send and receive messages', (done) => { diff --git a/src/app/broadcaster.service.ts b/src/app/broadcaster.service.ts index 64f3964..16b0f2a 100644 --- a/src/app/broadcaster.service.ts +++ b/src/app/broadcaster.service.ts @@ -41,14 +41,9 @@ interface BroadcastEvent { }) export class Broadcaster { private _eventBus: Subject; - public static refCount: number = 1; constructor() { this._eventBus = new Subject(); - Broadcaster.refCount++; - if (Broadcaster.refCount > 1) { - throw new Error('Multiple broadcaster instances detected, this is a fatal error.'); - } } /**