diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-07-20 16:28:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-20 23:28:13 +0800 |
commit | a5db8cd14c55aa64cb6e5cfb4f98f87aa38504dd (patch) | |
tree | 3111a63135e2659e51f2a8096e9d6b732f3c53e9 /lib/compress.js | |
parent | 2021c2fa3e616da497f8fc305010c9c1dd1a67de (diff) | |
download | tracifyjs-a5db8cd14c55aa64cb6e5cfb4f98f87aa38504dd.tar.gz tracifyjs-a5db8cd14c55aa64cb6e5cfb4f98f87aa38504dd.zip |
fix corner case in `collapse_vars` (#4013)
fixes #4012
Diffstat (limited to 'lib/compress.js')
-rw-r--r-- | lib/compress.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js index 2c8c7769..a464b664 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -1197,7 +1197,9 @@ merge(Compressor.prototype, { function find_loop_scope_try() { var node = compressor.self(), level = 0; do { - if (node instanceof AST_Catch || node instanceof AST_Finally) { + if (node instanceof AST_Catch) { + if (!compressor.parent(level).bfinally) level++; + } else if (node instanceof AST_Finally) { level++; } else if (node instanceof AST_IterationStatement) { in_loop = true; |