fix corner case in AST_For.init (#1652)
Enforce `null` as value for empty initialisation blocks. fixes #1648
This commit is contained in:
@@ -2327,6 +2327,7 @@ merge(Compressor.prototype, {
|
||||
};
|
||||
|
||||
OPT(AST_For, function(self, compressor){
|
||||
if (is_empty(self.init)) self.init = null;
|
||||
if (!compressor.option("loops")) return self;
|
||||
if (self.condition) {
|
||||
var cond = self.condition.evaluate(compressor);
|
||||
|
||||
Reference in New Issue
Block a user