We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
globalThis
1 parent f176285 commit 4df5d4dCopy full SHA for 4df5d4d
package.json
@@ -65,6 +65,9 @@
65
},
66
"eslintConfig": {
67
"extends": "./node_modules/kcd-scripts/eslint.js",
68
+ "globals": {
69
+ "globalThis": "readonly"
70
+ },
71
"rules": {
72
"react/prop-types": "off",
73
"react/no-adjacent-inline-elements": "off",
src/act-compat.js
@@ -4,6 +4,10 @@ const domAct = testUtils.act
4
5
function getGlobalThis() {
6
/* istanbul ignore else */
7
+ if (typeof globalThis !== 'undefined') {
8
+ return globalThis
9
+ }
10
+ /* istanbul ignore next */
11
if (typeof self !== 'undefined') {
12
return self
13
}
0 commit comments