From a08aaeea584a326c7d1a40cbcbd1b28b64c4e08c Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Thu, 22 Jun 2023 19:57:02 +0300 Subject: [PATCH] instanceOf: workaround bundler issue with `process.env` (#3923) Fixes: #3919 #3920 #3921 --- src/jsutils/instanceOf.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jsutils/instanceOf.ts b/src/jsutils/instanceOf.ts index b917cfc3bf..05eac2ca89 100644 --- a/src/jsutils/instanceOf.ts +++ b/src/jsutils/instanceOf.ts @@ -9,7 +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 - globalThis.process?.env.NODE_ENV === 'production' + globalThis.process && globalThis.process.env.NODE_ENV === 'production' ? function instanceOf(value: unknown, constructor: Constructor): boolean { return value instanceof constructor; }