Skip to content

Commit 8cbcb01

Browse files
committed
fix: only access Node.js global if available
1 parent 95dac43 commit 8cbcb01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jsutils/instanceOf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { inspect } from './inspect';
99
export const instanceOf: (value: unknown, constructor: Constructor) => boolean =
1010
/* c8 ignore next 5 */
1111
// FIXME: https://github.com/graphql/graphql-js/issues/2317
12-
process.env.NODE_ENV === 'production'
12+
globalThis.process?.env.NODE_ENV === 'production'
1313
? function instanceOf(value: unknown, constructor: Constructor): boolean {
1414
return value instanceof constructor;
1515
}

0 commit comments

Comments
 (0)