We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd8a93b commit b37e57eCopy full SHA for b37e57e
src/components/Context.ts
@@ -16,9 +16,9 @@ export interface ReactReduxContextValue<
16
}
17
18
const ContextKey = Symbol.for(`react-redux-context`)
19
-const gT = globalThis as {
+const gT: {
20
[ContextKey]?: Map<typeof createContext, Context<ReactReduxContextValue>>
21
-}
+} = (typeof globalThis !== "undefined" ? globalThis : /* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */ {}) as any;
22
23
function getContext() {
24
const contextMap = (gT[ContextKey] ??= new Map())
0 commit comments