fix(requeue): Always requeue implicitely created BlockStatements (#6193)
This reverts the former fix done in #5743 and always requeues BlockStatements when they get created. This also fixes a bug in babel-generator which would indent code even though no comments are present.
This commit is contained in:
committed by
Henry Zhu
parent
2dd03e3ee9
commit
ca117e08cb
@@ -443,7 +443,7 @@ export default class Printer {
|
||||
}
|
||||
|
||||
printAndIndentOnComments(node, parent) {
|
||||
const indent = !!node.leadingComments;
|
||||
const indent = node.leadingComments && node.leadingComments.length > 0;
|
||||
if (indent) this.indent();
|
||||
this.print(node, parent);
|
||||
if (indent) this.dedent();
|
||||
@@ -468,7 +468,7 @@ export default class Printer {
|
||||
}
|
||||
|
||||
printInnerComments(node, indent = true) {
|
||||
if (!node.innerComments) return;
|
||||
if (!node.innerComments || !node.innerComments.length) return;
|
||||
if (indent) this.indent();
|
||||
this._printComments(node.innerComments);
|
||||
if (indent) this.dedent();
|
||||
|
||||
Reference in New Issue
Block a user