better handle spaces in IfStatement generator
This commit is contained in:
parent
7a0dbb0203
commit
e8dc4628ae
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user