Wrap ForStatement in a block for const decls (#172)
This commit is contained in:
1 parent
b429b2443c
commit
6be89286bb
1 file changed
+2
-1
+2
-1
@@ -867,7 +867,7 @@ function genericPrintNoParens(path, options, print) {
|
||||
}
|
||||
|
||||
return group(concat(parts));
|
||||
case "ForStatement":
|
||||
case "ForStatement": {
|
||||
const body = adjustClause(path.call(print, "body"), options);
|
||||
|
||||
if (!n.init && !n.test && !n.update) {
|
||||
@@ -900,6 +900,7 @@ function genericPrintNoParens(path, options, print) {
|
||||
")",
|
||||
body,
|
||||
]);
|
||||
}
|
||||
case "WhileStatement":
|
||||
return concat([
|
||||
"while (",
|
||||
|
||||
Reference in new issue
Block a user