Skip to content

Commit b37e57e

Browse files
authored
addresses #2053
1 parent cd8a93b commit b37e57e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Context.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ export interface ReactReduxContextValue<
1616
}
1717

1818
const ContextKey = Symbol.for(`react-redux-context`)
19-
const gT = globalThis as {
19+
const gT: {
2020
[ContextKey]?: Map<typeof createContext, Context<ReactReduxContextValue>>
21-
}
21+
} = (typeof globalThis !== "undefined" ? globalThis : /* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */ {}) as any;
2222

2323
function getContext() {
2424
const contextMap = (gT[ContextKey] ??= new Map())

0 commit comments

Comments
 (0)