diff --git a/lib/6to5/generators/statements.js b/lib/6to5/generators/statements.js index 4e32b73123..fc6a511494 100644 --- a/lib/6to5/generators/statements.js +++ b/lib/6to5/generators/statements.js @@ -15,14 +15,12 @@ exports.IfStatement = function (node, print) { print(node.test); this.push(") "); - var consequent = node.consequent; - if (node.alternate) consequent = t.toBlock(consequent); - print(consequent); + print(node.consequent); if (node.alternate) { if (this.isLast("}")) this.push(" "); this.keyword("else"); - print(t.toBlock(node.alternate)); + print(node.alternate); } }; @@ -159,15 +157,13 @@ exports.SwitchCase = function (node, print) { this.push("default:"); } - this.indent(); if (node.consequent.length === 1) { this.push(" "); print(node.consequent[0]); } else if (node.consequent.length > 1) { this.newline(); - print.sequence(node.consequent); + print.sequence(node.consequent, { indent: true }); } - this.dedent(); }; exports.DebuggerStatement = function () {