diff --git a/lib/6to5/generation/generators/statements.js b/lib/6to5/generation/generators/statements.js index b5f6d02fcd..7aaa448e1a 100644 --- a/lib/6to5/generation/generators/statements.js +++ b/lib/6to5/generation/generators/statements.js @@ -23,7 +23,11 @@ exports.IfStatement = function (node, print) { if (node.alternate) { if (this.isLast("}")) this.push(" "); this.keyword("else"); - this.push(" "); + + if (this.format.format && !t.isBlockStatement(node.alternate)) { + this.push(" "); + } + print.indentOnComments(node.alternate); } };