Skip to content

Commit c51c895

Browse files
committed
fix: only access Node.js global if available
1 parent a26f7c3 commit c51c895

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)