Skip to content

Commit

Permalink
rpc: 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 465189f commit a2bbb67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/src/rpc.ts
Original file line number Diff line number Diff line change
@@ -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) {
}
Expand Down

0 comments on commit a2bbb67

Please sign in to comment.