aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/analyzer.js3
-rw-r--r--src/jsifier.js2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/analyzer.js b/src/analyzer.js
index 30512b45..c4773b95 100644
--- a/src/analyzer.js
+++ b/src/analyzer.js
@@ -733,7 +733,8 @@ function analyzer(data) {
if (!block) return;
function singular(block) {
- if (!block || block.type === 'multiple') return null;
+ if (!block) return endOfTheWorld;
+ if (block.type === 'multiple') return null;
if (block.entries.length == 1) {
return block.entries[0];
} else {
diff --git a/src/jsifier.js b/src/jsifier.js
index 15e66669..0395b5f9 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -349,7 +349,7 @@ function JSify(data) {
multipleIdent = ' ';
}
block.entryLabels.forEach(function(entryLabel) {
- ret += indent + (first ? '' : 'else ') + multipleIdent + 'if (__label__ == ' + getLabelId(entryLabel.ident) + ') {\n';
+ ret += indent + multipleIdent + (first ? '' : 'else ') + 'if (__label__ == ' + getLabelId(entryLabel.ident) + ') {\n';
ret += walkBlock(entryLabel.block, indent + ' ' + multipleIdent);
ret += indent + multipleIdent + '}\n';
first = false;