From a2bbb676706c62fc640a1c4f7682122e49f28eef Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Sat, 3 Aug 2024 10:21:49 -0700 Subject: [PATCH] rpc: use globalThis rather than global --- server/src/rpc.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/rpc.ts b/server/src/rpc.ts index 9091d1a86..da30e15ab 100644 --- a/server/src/rpc.ts +++ b/server/src/rpc.ts @@ -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) { }