Skip to content

Commit

Permalink
fix: closure hiding changes to packet
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Kimball authored and Brian Kimball committed Feb 12, 2018
1 parent ee11ae0 commit a773dfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AppBridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> {
Object.assign(packet, { id: this.id, windowName: this.windowName || window.name });
return new Promise<string>((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) {
Expand Down

0 comments on commit a773dfd

Please sign in to comment.