Skip to content

Commit 546c13f

Browse files
committed
remove globalThis process env check
1 parent 8a95335 commit 546c13f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/jsutils/instanceOf.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { inspect } from './inspect';
22

3+
const isProduction = typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'production';
4+
35
/**
46
* A replacement for instanceof which includes an error warning when multi-realm
57
* constructors are detected.
@@ -9,7 +11,7 @@ import { inspect } from './inspect';
911
export const instanceOf: (value: unknown, constructor: Constructor) => boolean =
1012
/* c8 ignore next 6 */
1113
// FIXME: https://github.com/graphql/graphql-js/issues/2317
12-
globalThis.process && globalThis.process.env.NODE_ENV === 'production'
14+
isProduction
1315
? function instanceOf(value: unknown, constructor: Constructor): boolean {
1416
return value instanceof constructor;
1517
}

0 commit comments

Comments
 (0)