diff --git a/lib/6to5/generators/statements.js b/lib/6to5/generators/statements.js index 8d00388636..b11a7b9868 100644 --- a/lib/6to5/generators/statements.js +++ b/lib/6to5/generators/statements.js @@ -14,6 +14,12 @@ exports.IfStatement = function (node, print) { print(node.test); this.push(") "); print(node.consequent); + + if (node.alternate) { + if (this.isLast("}")) this.push(" "); + this.keyword("else"); + print(node.alternate); + } }; exports.BlockStatement = function (node, print) {