Only allow var definitions to be moved into the for-init clause
Fixes #1079
This commit is contained in:
@@ -802,7 +802,7 @@ merge(Compressor.prototype, {
|
||||
CHANGED = true;
|
||||
}
|
||||
else if (stat instanceof AST_For
|
||||
&& prev instanceof AST_Definitions
|
||||
&& prev instanceof AST_Var
|
||||
&& (!stat.init || stat.init.TYPE == prev.TYPE)) {
|
||||
CHANGED = true;
|
||||
a.pop();
|
||||
|
||||
Reference in New Issue
Block a user