Skip to content

Commit

Permalink
Fix window interface
Browse files Browse the repository at this point in the history
  • Loading branch information
benStre committed Nov 17, 2023
1 parent 9ac3f92 commit bc503af
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions windows/window-com-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ export class WindowCommunicationInterface extends CommonInterface<[Window, strin
}
// is the child
else if (this.initial_arguments[0]) {
this.parentDocument = this.initial_arguments[0]
this.otherOrigin = new URL(document.referrer).origin;

this.parentDocument = this.initial_arguments[0];
this.otherOrigin = this.initial_arguments[1] ?? new URL(document.referrer).origin;
this.logger.info("initializing as child window, parent window origin: " + this.otherOrigin)

}
Expand Down

0 comments on commit bc503af

Please sign in to comment.