fix corner case in reduce_vars (#4663)

fixes #4662
This commit is contained in:
Alex Lam S.L
2021-02-18 15:24:55 +00:00
committed by GitHub
parent a7bcd4d613
commit 7b4fd858ba
2 changed files with 28 additions and 1 deletions

View File

@@ -864,7 +864,11 @@ merge(Compressor.prototype, {
push_ref(d, lhs);
if (d.fixed) {
lhs.fixed = d.fixed;
lhs.fixed.assigns = [ node ];
if (lhs.fixed.assigns) {
lhs.fixed.assigns.push(node);
} else {
lhs.fixed.assigns = [ node ];
}
}
} else {
lhs.walk(tw);