collapse_vars should not replace constant in for-in init section (#1538)
fixes #1537
This commit is contained in:
@@ -1315,3 +1315,17 @@ collapse_vars_regexp: {
|
||||
})();
|
||||
}
|
||||
}
|
||||
|
||||
issue_1537: {
|
||||
options = {
|
||||
collapse_vars: true,
|
||||
}
|
||||
input: {
|
||||
var k = '';
|
||||
for (k in {prop: 'val'}){}
|
||||
}
|
||||
expect: {
|
||||
var k = '';
|
||||
for (k in {prop: 'val'});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user