From ac403018135b0ba700ef6223970c1bbc2a518107 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Fri, 17 Mar 2017 00:26:48 +0800 Subject: fix chained evaluation (#1610) `reduce_vars` enables substitution of variables but did not clone the value's `AST_Node`. This confuses `collapse_vars` and result in invalid AST and subsequent crash. fixes #1609 --- lib/compress.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/compress.js') diff --git a/lib/compress.js b/lib/compress.js index dac1f364..c3f12549 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -3461,7 +3461,7 @@ merge(Compressor.prototype, { } } if (d.should_replace) { - return d.should_replace; + return d.should_replace.clone(true); } } } -- cgit v1.2.3