public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a63f2f
)
account for `catch` in constant lambda expressions (#3454)
author
Alex Lam S.L
<alexlamsl@gmail.com>
Sun, 6 Oct 2019 08:51:37 +0000
(16:51 +0800)
committer
GitHub
<noreply@github.com>
Sun, 6 Oct 2019 08:51:37 +0000
(16:51 +0800)
lib/compress.js
patch
|
blob
|
history
diff --git
a/lib/compress.js
b/lib/compress.js
index
5ea5d00
..
bffb6f7
100644
(file)
--- 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();