fix corner case in AST_For.init (#1652)

Enforce `null` as value for empty initialisation blocks.

fixes #1648
This commit is contained in:
Alex Lam S.L
2017-03-24 19:31:17 +08:00
committed by GitHub
parent 0432a7abb9
commit ac51d4c5a0
3 changed files with 20 additions and 1 deletions

View File

@@ -440,3 +440,21 @@ issue_186_beautify_bracketize_ie8: {
'}',
]
}
issue_1648: {
options = {
join_vars: true,
loops: true,
passes: 2,
sequences: true,
unused: true,
}
input: {
function f() {
x();
var b = 1;
while (1);
}
}
expect_exact: "function f(){for(x();1;);}"
}