From 24062757bb7570434ef1022b1f0aa07a33552377 Mon Sep 17 00:00:00 2001 From: Gert Hengeveld Date: Mon, 19 Oct 2020 12:32:13 +0200 Subject: [PATCH] Ignore type completely. --- packages/react-async/src/globalScope.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/react-async/src/globalScope.ts b/packages/react-async/src/globalScope.ts index 798b4d78..91a0067e 100644 --- a/packages/react-async/src/globalScope.ts +++ b/packages/react-async/src/globalScope.ts @@ -11,9 +11,10 @@ declare type GlobalScope = { * This file is excluded from coverage reporting because these globals are environment-specific so we can't test them all. */ const globalScope = (() => { + const glbl = global as any if (typeof self === "object" && self.self === self) return self - if (typeof global === "object" && global.global === global) return global - if (typeof global === "object" && global["GLOBAL"] === global) return global + if (typeof glbl === "object" && glbl.global === glbl) return glbl + if (typeof glbl === "object" && glbl.GLOBAL === glbl) return glbl return {} // fallback that relies on imported modules to be singletons })() as GlobalScope