aboutsummaryrefslogtreecommitdiff
path: root/src/shell.js
diff options
context:
space:
mode:
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