fix(WebWorker): Make MessageBus EventEmitter synchronous

This commit is contained in:
Jason Teplitz 2016-02-04 10:58:40 -08:00 committed by vsavkin
parent 01fe7f5fac
commit 69c1694900
1 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ export class PostMessageBusSink implements MessageBusSink {
throw new BaseException(`${channel} has already been initialized`);
}
var emitter = new EventEmitter();
var emitter = new EventEmitter(false);
var channelInfo = new _Channel(emitter, runInZone);
this._channels[channel] = channelInfo;
emitter.subscribe((data: Object) => {
@ -82,7 +82,7 @@ export class PostMessageBusSource implements MessageBusSource {
throw new BaseException(`${channel} has already been initialized`);
}
var emitter = new EventEmitter();
var emitter = new EventEmitter(false);
var channelInfo = new _Channel(emitter, runInZone);
this._channels[channel] = channelInfo;
}