From a773dfd26648515c174e6bd84909aae709711830 Mon Sep 17 00:00:00 2001 From: Brian Kimball Date: Mon, 12 Feb 2018 14:35:27 -0500 Subject: [PATCH] fix: closure hiding changes to packet --- src/AppBridge.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AppBridge.ts b/src/AppBridge.ts index 11c0708..fec5072 100644 --- a/src/AppBridge.ts +++ b/src/AppBridge.ts @@ -474,8 +474,8 @@ export class AppBridge { * @param packet any - packet of data to send with the event */ public register(packet: Partial<{ title: string, url: string, color: string }> = {}): Promise { - Object.assign(packet, { id: this.id, windowName: this.windowName || window.name }); return new Promise((resolve, reject) => { + Object.assign(packet, { id: this.id, windowName: this.windowName || window.name }); if (this._handlers[AppBridgeHandler.REGISTER]) { this._handlers[AppBridgeHandler.REGISTER](packet, (windowName: string) => { if (windowName) {