diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-03-25 21:17:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-25 21:17:30 +0800 |
commit | 0a65de89b97731cd83a077303dd0511ba7ff7151 (patch) | |
tree | 7f8b8bafdf63651b66adc01cd18f80ea95682b3c /lib | |
parent | 6e86ee950d98ebacef7e02515e34d758c4f836a1 (diff) | |
download | tracifyjs-0a65de89b97731cd83a077303dd0511ba7ff7151.tar.gz tracifyjs-0a65de89b97731cd83a077303dd0511ba7ff7151.zip |
fix `reduce_vars` on `AST_Switch` (#1671)
Take conditional nature of switch branches into account.
fixes #1670
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compress.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js index e12c5eb0..bea9c9a4 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -341,7 +341,7 @@ merge(Compressor.prototype, { pop(); return true; } - if (node instanceof AST_Catch) { + if (node instanceof AST_Catch || node instanceof AST_SwitchBranch) { push(); descend(); pop(); |