Skip to content

Commit 21ea73f

Browse files
buu700kripken
authored andcommitted
SINGLE_FILE + ASSERTIONS fix (#5680)
1 parent 7cc3ed8 commit 21ea73f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/jsifier.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,8 @@ function JSify(data, functionsOnly) {
522522
print('assert(STACK_MAX < SPLIT_MEMORY, "SPLIT_MEMORY size must be big enough so the entire static memory + stack can fit in one chunk, need " + STACK_MAX);\n');
523523
}
524524

525+
if (ASSERTIONS) print('var ASSERTIONS = true;\n');
526+
525527
print(preprocess(read('arrayUtils.js')));
526528
// Export all arrayUtils.js functions
527529
print(maybeExport('intArrayFromString'));
@@ -551,8 +553,6 @@ function JSify(data, functionsOnly) {
551553
// "Final shape that will be created").
552554
print('// EMSCRIPTEN_END_FUNCS\n');
553555

554-
if (ASSERTIONS) print('var ASSERTIONS = true;\n');
555-
556556
if (HEADLESS) {
557557
print('if (!ENVIRONMENT_IS_WEB) {');
558558
print(read('headlessCanvas.js'));

0 commit comments

Comments
 (0)