Skip to content

Commit

Permalink
fix: 🐛 resolved globalThis is undefinded in react-native-window (#7629)
Browse files Browse the repository at this point in the history
  • Loading branch information
shupingchu authored Jan 10, 2024
1 parent 296a383 commit 36f25e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <ISurveyEnvironment>(!!document ? {
root: document,

Expand Down

0 comments on commit 36f25e6

Please sign in to comment.