diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-11-28 21:38:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-29 05:38:24 +0800 |
commit | f045e2b46077e84db8b7ae787819a010077ce1fd (patch) | |
tree | 386cf2b4c0368950e28cfa23b93fb0d7be579320 /lib | |
parent | 8791f258e3996adb882fc62329f970270366b216 (diff) | |
download | tracifyjs-f045e2b46077e84db8b7ae787819a010077ce1fd.tar.gz tracifyjs-f045e2b46077e84db8b7ae787819a010077ce1fd.zip |
fix corner case in `merge_vars` (#4324)
fixes #4323
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 7759ff11..708b9df3 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -4784,6 +4784,7 @@ merge(Compressor.prototype, { if (node instanceof AST_SymbolFunarg) mark(node, false, true); }; var scanner = new TreeWalker(function(ref) { + if (ref instanceof AST_SymbolDeclaration) references[ref.definition().id] = false; if (!(ref instanceof AST_SymbolRef)) return; var def = ref.definition(); var ldef = node.variables.get(ref.name); |