use space helper instead of pushing a space in IfStatement generation

This commit is contained in:
Sebastian McKenzie 2015-02-12 07:46:21 +11:00
parent d7bea2f325
commit 5ff0285ba7

View File

@ -21,7 +21,7 @@ exports.IfStatement = function (node, print) {
print.indentOnComments(node.consequent);
if (node.alternate) {
if (this.isLast("}")) this.push(" ");
if (this.isLast("}")) this.space();
this.keyword("else");
if (this.format.format && !t.isBlockStatement(node.alternate)) {