fix(core): update

This commit is contained in:
2020-10-06 21:49:03 +00:00
parent b26aa04388
commit ddf28a8d0e
4 changed files with 13 additions and 12 deletions

View File

@ -12,10 +12,13 @@ export class DeesComms {
private subscriptionChannel = new BroadcastChannel('dees-comms');
constructor() {
this.subscriptionChannel.onmessage = (eventArg) => {
this.subscriptionChannel.onmessage = async (eventArg) => {
const message = eventArg.data;
console.log(JSON.stringify(message));
this.typedrouter.routeAndAddResponse(message);
const response = await this.typedrouter.routeAndAddResponse(message);
if (response) {
this.postMessage(response);
}
};
}