Skip to content

Commit

Permalink
Remove spurious reference to process.
Browse files Browse the repository at this point in the history
Fixes #1257
  • Loading branch information
leebyron committed Apr 18, 2018
1 parent 69d90c6 commit 60c03ab
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/jsutils/instanceOf.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ declare function instanceOf(
constructor: mixed,
): boolean %checks(value instanceof constructor);

export default (process && process.env.NODE_ENV !== 'production'
// See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production
// See: https://webpack.js.org/guides/production/
export default (process.env.NODE_ENV === 'production'
? // eslint-disable-next-line no-shadow
function instanceOf(value: any, constructor: any) {
return value instanceof constructor;
}
: // eslint-disable-next-line no-shadow
function instanceOf(value: any, constructor: any) {
if (value instanceof constructor) {
return true;
Expand All @@ -43,8 +49,4 @@ spurious results.`,
}
}
return false;
}
: // eslint-disable-next-line no-shadow
function instanceOf(value: any, constructor: any) {
return value instanceof constructor;
});

0 comments on commit 60c03ab

Please sign in to comment.