From: Mihai Bazon Date: Fri, 7 Sep 2012 13:02:08 +0000 (+0300) Subject: fix bug (forgot arg name) X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=048d6906ae6f43b60cfb0c025c242743f6d2c16f;p=UglifyJS.git fix bug (forgot arg name) --- diff --git a/lib/compress.js b/lib/compress.js index ea0218ed..953fd901 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -423,7 +423,7 @@ function Compressor(options, false_by_default) { self.second = self.second.negate(compressor); return self; }); - def(AST_Conditional, function(){ + def(AST_Conditional, function(compressor){ var self = this.clone(); self.consequent = self.consequent.negate(compressor); self.alternative = self.alternative.negate(compressor); @@ -703,7 +703,7 @@ function Compressor(options, false_by_default) { && self.alternative instanceof AST_EmptyStatement) { return make_node(AST_SimpleStatement, self.condition, { body: self.condition - }); + }).optimize(compressor); } if (self.body instanceof AST_SimpleStatement && self.alternative instanceof AST_SimpleStatement) {