From: Mihai Bazon Date: Fri, 30 Nov 2012 09:16:09 +0000 (+0200) Subject: Don't messup compressor stack while optimizing Switch X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=5cc90db7d0c8983b6cae38df9dca540acbc1481b;p=UglifyJS.git Don't messup compressor stack while optimizing Switch Fix #59 --- diff --git a/lib/compress.js b/lib/compress.js index d78d41d6..c1cb1464 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -1430,7 +1430,7 @@ merge(Compressor.prototype, { return node; } }); - tt.stack = compressor.stack; // so that's able to see parent nodes + tt.stack = compressor.stack.slice(); // so that's able to see parent nodes self = self.transform(tt); } catch(ex) { if (ex !== self) throw ex;