diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-11-08 20:47:58 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-11-08 20:47:58 -0800 |
commit | d81f5bd1f567bb0c18b0be2a4bf7015e6435fced (patch) | |
tree | 314aafab8c52a4d47652d0f687aecb2465ccd3c2 | |
parent | d7d580d22e6c1698e53fa31a0ba65715eee60d7e (diff) |
improve node detection in compiler
-rw-r--r-- | src/compiler.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler.js b/src/compiler.js index 993fcb36..3ce53b1e 100644 --- a/src/compiler.js +++ b/src/compiler.js @@ -13,7 +13,7 @@ try { // *** Environment setup code *** var arguments_ = []; -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; |