Skip to content

Commit 2736f45

Browse files
Revert "instanceOf: support Deno (graphql#2642)" (graphql#2653)
This reverts commit 916e697.
1 parent d67f105 commit 2736f45

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

src/jsutils/instanceOf.js

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ declare function instanceOf(
1111

1212
// See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production
1313
// See: https://webpack.js.org/guides/production/
14-
export default isProductionEnvironment()
14+
export default process.env.NODE_ENV === 'production'
1515
? // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
1616
// eslint-disable-next-line no-shadow
1717
function instanceOf(value: mixed, constructor: mixed) {
@@ -44,28 +44,3 @@ spurious results.`,
4444
}
4545
return false;
4646
};
47-
48-
/* global Deno */
49-
/* :: declare var Deno: any; */
50-
51-
function isProductionEnvironment() {
52-
// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
53-
try {
54-
if (process.env.NODE_ENV === 'production') {
55-
return true;
56-
}
57-
} catch (e) {
58-
// ignore
59-
}
60-
61-
// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
62-
try {
63-
if (Deno.env.get('DENO_ENV') === 'production') {
64-
return true;
65-
}
66-
} catch (e) {
67-
// ignore
68-
}
69-
70-
return false;
71-
}

0 commit comments

Comments
 (0)