Skip to content

Commit

Permalink
account for catch in constant lambda expressions (#3454)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlamsl committed Oct 6, 2019
1 parent 0a63f2f commit 8a4c707
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/compress.js
Expand Up @@ -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();
Expand Down

0 comments on commit 8a4c707

Please sign in to comment.