We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
globalThis
1 parent 00c89dc commit 40d8f04Copy full SHA for 40d8f04
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
@@ -3,6 +3,10 @@ import * as testUtils from 'react-dom/test-utils'
3
const domAct = testUtils.act
4
5
function getGlobalThis() {
6
+ /* istanbul ignore else */
7
+ if (typeof globalThis !== 'undefined') {
8
+ return globalThis
9
+ }
10
/* istanbul ignore else */
11
if (typeof self !== 'undefined') {
12
return self
0 commit comments