From 048d6906ae6f43b60cfb0c025c242743f6d2c16f Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Fri, 7 Sep 2012 16:02:08 +0300 Subject: [PATCH] fix bug (forgot arg name) --- lib/compress.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) { -- 2.34.1