aboutsummaryrefslogtreecommitdiff
path: root/src/shell.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-11-08 20:50:08 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-11-08 20:50:08 -0800
commit9682ed71fa4141da25ae14d3c4c51ceb311dc56d (patch)
tree42840786a753829161cba6be47295717310d8cca /src/shell.js
parent601689ef8cf260b9bcf966a0618cad068641cc8a (diff)
improve node detection
Diffstat (limited to 'src/shell.js')
-rw-r--r--src/shell.js2
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;