From fa1adf884958df3072c0efe971dd6090569446f5 Mon Sep 17 00:00:00 2001 From: Brian Kimball Date: Mon, 12 Feb 2018 15:11:07 -0500 Subject: [PATCH] fix: should not override windowName --- src/AppBridge.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/AppBridge.ts b/src/AppBridge.ts index fec5072..5da8eb4 100644 --- a/src/AppBridge.ts +++ b/src/AppBridge.ts @@ -114,7 +114,6 @@ export class AppBridge { this._trace(MESSAGE_TYPES.REGISTER, event); this._registeredFrames.push(event); return this.register(event.data).then(windowName => { - this.windowName = windowName; return { windowName }; }); }); @@ -474,8 +473,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 }); 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) {