fix corner case in evaluate (#3946)

fixes #3944
This commit is contained in:
Alex Lam S.L
2020-06-02 16:50:40 +01:00
committed by GitHub
parent b24eb22c6b
commit c97ad98f92
2 changed files with 30 additions and 1 deletions

View File

@@ -3308,7 +3308,7 @@ merge(Compressor.prototype, {
}
var op = this.operator;
var node;
if (HOP(lhs, "_eval") || !(lhs instanceof AST_SymbolRef) || !lhs.fixed_value()) {
if (HOP(lhs, "_eval") || !(lhs instanceof AST_SymbolRef) || !lhs.fixed || !lhs.definition().fixed) {
node = op == "=" ? this.right : make_node(AST_Binary, this, {
operator: op.slice(0, -1),
left: lhs,