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) {