diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-11-08 20:50:08 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-11-08 20:50:08 -0800 |
commit | 9682ed71fa4141da25ae14d3c4c51ceb311dc56d (patch) | |
tree | 42840786a753829161cba6be47295717310d8cca /src | |
parent | 601689ef8cf260b9bcf966a0618cad068641cc8a (diff) |
improve node detection
Diffstat (limited to 'src')
-rw-r--r-- | src/shell.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shell.js b/src/shell.js index d6dc0fb5..5571b8ac 100644 --- a/src/shell.js +++ b/src/shell.js @@ -8,7 +8,7 @@ try { // The environment setup code below is customized to use Module. // *** Environment setup code *** -var ENVIRONMENT_IS_NODE = typeof process === 'object'; +var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function'; var ENVIRONMENT_IS_WEB = typeof window === 'object'; var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; |