Skip to content

Commit

Permalink
check "globalThis.process" before accessing it (#3887)
Browse files Browse the repository at this point in the history
Closes #3758
  • Loading branch information
kettanaito committed May 2, 2023
1 parent 076972e commit 84bb146
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/jsutils/instanceOf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import { inspect } from './inspect';
export const instanceOf: (value: unknown, constructor: Constructor) => boolean =
/* c8 ignore next 6 */
// FIXME: https://github.com/graphql/graphql-js/issues/2317
// eslint-disable-next-line no-undef
process.env.NODE_ENV === 'production'
globalThis.process?.env.NODE_ENV === 'production'
? function instanceOf(value: unknown, constructor: Constructor): boolean {
return value instanceof constructor;
}
Expand Down

0 comments on commit 84bb146

Please sign in to comment.