From 8a4c7077bb78b45cd920a6804011ba433c196481 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Sun, 6 Oct 2019 16:51:37 +0800 Subject: [PATCH] account for `catch` in constant lambda expressions (#3454) --- lib/compress.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/compress.js b/lib/compress.js index 5ea5d00b9c..bffb6f7476 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -3403,6 +3403,12 @@ merge(Compressor.prototype, { var inner_scopes = []; self.walk(new TreeWalker(function(node, descend) { if (!result) return true; + if (node instanceof AST_Catch) { + inner_scopes.push(node.argname.scope); + descend(); + inner_scopes.pop(); + return true; + } if (node instanceof AST_Scope && node !== self) { inner_scopes.push(node); descend();