aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/jsifier.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 6de7ecf4..297af69e 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -390,10 +390,9 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) {
first = false;
});
} else {
- block.entryLabels.forEach(function(entryLabel, i) {
- var last = i === block.entryLabels.length-1;
- ret += indent + multipleIdent + (first ? '' : 'else ') + // add the final |if| only when we have assertions (we have a final else there)
- ((!last || ASSERTIONS) ? 'if (__label__ == ' + getLabelId(entryLabel.ident) + ')' : '') + ' {\n';
+ // TODO: Find out cases where the final if is not needed - where we know we must be in a specific label at that point
+ block.entryLabels.forEach(function(entryLabel) {
+ ret += indent + multipleIdent + (first ? '' : 'else ') + 'if (__label__ == ' + getLabelId(entryLabel.ident) + ') {\n';
ret += walkBlock(entryLabel.block, indent + ' ' + multipleIdent);
ret += indent + multipleIdent + '}\n';
first = false;