Skip to content

Commit 84bb146

Browse files
authored
check "globalThis.process" before accessing it (#3887)
Closes #3758
1 parent 076972e commit 84bb146

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/jsutils/instanceOf.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import { inspect } from './inspect';
99
export const instanceOf: (value: unknown, constructor: Constructor) => boolean =
1010
/* c8 ignore next 6 */
1111
// FIXME: https://github.com/graphql/graphql-js/issues/2317
12-
// eslint-disable-next-line no-undef
13-
process.env.NODE_ENV === 'production'
12+
globalThis.process?.env.NODE_ENV === 'production'
1413
? function instanceOf(value: unknown, constructor: Constructor): boolean {
1514
return value instanceof constructor;
1615
}

0 commit comments

Comments
 (0)