From 1575dd7eeb2191e917c09cb81e3dfafa7fd4d4ec Mon Sep 17 00:00:00 2001 From: mattias Date: Thu, 12 May 2022 10:57:30 +0200 Subject: [PATCH] fcl-base: ReloadEnvironmentStrings: check window --- packages/fcl-base/serviceworkerapp.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/fcl-base/serviceworkerapp.pas b/packages/fcl-base/serviceworkerapp.pas index b32ea74..6f5fe6e 100644 --- a/packages/fcl-base/serviceworkerapp.pas +++ b/packages/fcl-base/serviceworkerapp.pas @@ -59,6 +59,8 @@ var S,N : String; A,P : TStringDynArray; begin + if not jsvalue(Window) then exit; + if not jsvalue(Window.location) then exit; if Assigned(EnvNames) then FreeAndNil(EnvNames); EnvNames:=TJSObject.new;