diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-06 10:30:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-06 18:30:50 +0800 |
commit | 3c384cf9a8ed4230cf87f14ab017b613b38df628 (patch) | |
tree | 7a03a1426fff2237af9a24861e2872df390eebad /lib | |
parent | 37f4f56752e0672ff8b76b1618266eae628088f7 (diff) | |
download | tracifyjs-3c384cf9a8ed4230cf87f14ab017b613b38df628.tar.gz tracifyjs-3c384cf9a8ed4230cf87f14ab017b613b38df628.zip |
fix corner case in `collapse_vars` (#4332)
fixes #4331
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compress.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/compress.js b/lib/compress.js index 82474b5c..e84465f6 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -2047,6 +2047,7 @@ merge(Compressor.prototype, { return (parent.tail_node() === node ? find_stop_value : find_stop_unused)(parent, level + 1); } if (parent instanceof AST_SimpleStatement) return find_stop_unused(parent, level + 1); + if (parent instanceof AST_Spread) return find_stop_value(parent, level + 1); if (parent instanceof AST_Switch) { if (parent.expression !== node) return node; return find_stop_value(parent, level + 1); |