mirror of
https://github.com/koush/scrypted.git
synced 2026-03-15 14:42:44 +00:00
rpc: use globalThis rather than global
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
export function startPeriodicGarbageCollection() {
|
||||
if (!global.gc) {
|
||||
if (!globalThis.gc) {
|
||||
console.warn('rpc peer garbage collection not available: global.gc is not exposed.');
|
||||
}
|
||||
let g: typeof global;
|
||||
let g: typeof globalThis;
|
||||
try {
|
||||
g = global;
|
||||
g = globalThis;
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user