From bc503af2467a3a9e1cbc4d84e59423482ae9d192 Mon Sep 17 00:00:00 2001 From: benStre Date: Sat, 18 Nov 2023 00:10:05 +0100 Subject: [PATCH] Fix window interface --- windows/window-com-interface.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/windows/window-com-interface.ts b/windows/window-com-interface.ts index 551f4cfb..70a823bf 100644 --- a/windows/window-com-interface.ts +++ b/windows/window-com-interface.ts @@ -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) }