Skip to content

Commit

Permalink
server: use globalThis rather than global
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Aug 3, 2024
1 parent 3cd3208 commit 2ac8e15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/scrypted-main-exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ function start(mainFilename: string, options?: {
require(process.env.SCRYPTED_COMPATIBILITY_FILE);
}

if (!global.gc) {
if (!globalThis.gc && !process.versions.deno) {
v8.setFlagsFromString('--expose_gc')
global.gc = vm.runInNewContext("gc");
globalThis.gc = vm.runInNewContext("gc");
}

if (!semver.gte(process.version, '16.0.0')) {
Expand Down

0 comments on commit 2ac8e15

Please sign in to comment.