diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-09-20 16:54:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-20 23:54:14 +0800 |
commit | 8fa470c17c56d62f971fa71fb1cb99e961b64d8e (patch) | |
tree | e0e319a5219509ea75507f8162aa260935c2ddcd /lib | |
parent | 90410f9fc3538a5f267c38470490b83086d71b85 (diff) | |
download | tracifyjs-8fa470c17c56d62f971fa71fb1cb99e961b64d8e.tar.gz tracifyjs-8fa470c17c56d62f971fa71fb1cb99e961b64d8e.zip |
fix corner case in `merge_vars` (#4136)
fixes #4135
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compress.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/compress.js b/lib/compress.js index 2df76f5f..82bbbf1b 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -4485,9 +4485,12 @@ merge(Compressor.prototype, { var head = first.pop(); var def = head.definition; if (!(def.id in prev)) continue; - var head_refs = references[def.id]; - if (!head_refs) continue; + if (!references[def.id]) continue; + var head_refs = { + start: references[def.id].start, + }; while (def.id in merged) def = merged[def.id]; + head_refs.end = references[def.id].end; var skipped = []; do { var tail = last.pop(); |