From 36f25e6b162d2482ce3c1e0d58d4a45d34053129 Mon Sep 17 00:00:00 2001 From: shupingchu <61330285+shupingchu@users.noreply.github.com> Date: Wed, 10 Jan 2024 00:47:36 -0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20resolved=20globalThis=20i?= =?UTF-8?q?s=20undefinded=20in=20react-native-window=20(#7629)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/settings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings.ts b/src/settings.ts index c5aa4a2dda..86ca276388 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -11,7 +11,7 @@ export type ISurveyEnvironment = { svgMountContainer: HTMLElement | string, stylesSheetsMountContainer: HTMLElement, } -const document = globalThis.document; +const document = typeof globalThis !== "undefined" ? globalThis.document : (this as any).document; const defaultEnvironment: ISurveyEnvironment = (!!document ? { root: document,