From 42ecd42ac00881f7d540cb08969ce7e2721e30d5 Mon Sep 17 00:00:00 2001 From: Richard van Velzen Date: Mon, 12 Jan 2015 17:09:34 +0100 Subject: Replace the correct node when replacing in `void` sequences Close #611. --- lib/compress.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/compress.js b/lib/compress.js index 1f1d4b50..72e4d92d 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -1937,7 +1937,7 @@ merge(Compressor.prototype, { if (self.cdr instanceof AST_UnaryPrefix && self.cdr.operator == "void" && !self.cdr.expression.has_side_effects(compressor)) { - self.cdr.operator = self.car; + self.cdr.expression = self.car; return self.cdr; } if (self.cdr instanceof AST_Undefined) { -- cgit v1.2.3