From f3fc8cb3d323a16affa8c3c828d18b4e5efcf9b1 Mon Sep 17 00:00:00 2001 From: alexlamsl Date: Sat, 25 Mar 2017 15:29:14 +0800 Subject: [PATCH] fix stack --- lib/compress.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/compress.js b/lib/compress.js index 5aed93e2..47eb4d73 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -2584,7 +2584,8 @@ merge(Compressor.prototype, { }); } }); - tt.stack = compressor.stack.slice(); // so that's able to see parent nodes + // allow transform() to view the whole AST + tt.stack = compressor.stack.slice(0, -1); self = self.transform(tt); } catch(ex) { if (ex !== self) throw ex;