aboutsummaryrefslogtreecommitdiff
path: root/src/shell.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-03-10 13:08:23 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-03-10 13:24:37 -0700
commit54b0f19d9e8130de16053b0915d114c346c99f17 (patch)
treec4e90ccb7192af726cd292e228e3a0e715b4b86a /src/shell.js
parent501fdd709bbab7b2c11639f5a1df45123193b69b (diff)
forward CLOSURE_COMPILER to settings, and use that to avoid a closure-specific workaround for Module detection; fixes #2209
Diffstat (limited to 'src/shell.js')
-rw-r--r--src/shell.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shell.js b/src/shell.js
index 65f7b923..e1c0eb54 100644
--- a/src/shell.js
+++ b/src/shell.js
@@ -14,7 +14,11 @@
// before the code. Then that object will be used in the code, and you
// can continue to use Module afterwards as well.
var Module;
+#if CLOSURE_COMPILER
if (!Module) Module = eval('(function() { try { return {{{ EXPORT_NAME }}} || {} } catch(e) { return {} } })()');
+#else
+if (!Module) Module = (typeof {{{ EXPORT_NAME }}} !== 'undefined' ? {{{ EXPORT_NAME }}} : null) || {};
+#endif
// Sometimes an existing Module object exists with properties
// meant to overwrite the default module functionality. Here