aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Austin <aegis@aegisknight.org>2012-09-04 23:51:32 -0700
committerChad Austin <chad@chadaustin.me>2012-09-25 16:26:06 -0700
commit0cf5de736748d1310e68d6de60039b53ca2e08be (patch)
tree7b3281ea1aa3bc2a99c8fbb42321f4be54b60128
parent659a28a6f9284dbf7bf4ecd6733a3b070b05d61a (diff)
Fix a crash when invoking emcc without a shell file.
-rw-r--r--src/jsifier.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 92b39b7d..456e50cf 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -32,7 +32,7 @@ function JSify(data, functionsOnly, givenFunctions) {
// else. This lets us not hold any strings in memory, we simply print
// things out as they are ready.
- var shellFile = SHELL_FILE ? SHELL_FILE : (BUILD_AS_SHARED_LIB ? 'shell_sharedlib.js' : 'shell.js');
+ var shellFile = (typeof SHELL_FILE !== 'undefined' && SHELL_FILE) ? SHELL_FILE : (BUILD_AS_SHARED_LIB ? 'shell_sharedlib.js' : 'shell.js');
var shellParts = read(shellFile).split('{{BODY}}');
print(shellParts[0]);
var preFile = BUILD_AS_SHARED_LIB ? 'preamble_sharedlib.js' : 'preamble.js';