fix corner case in collapse_vars (#4071)

fixes #4070
This commit is contained in:
Alex Lam S.L
2020-08-25 10:23:36 +01:00
committed by GitHub
parent 1caf7c7bd2
commit a31c27c7cf
2 changed files with 23 additions and 1 deletions

View File

@@ -1286,7 +1286,7 @@ merge(Compressor.prototype, {
col: node.start.col
});
if (candidate instanceof AST_UnaryPostfix) {
lhs.definition().fixed = false;
if (lhs instanceof AST_SymbolRef) lhs.definition().fixed = false;
return make_node(AST_UnaryPrefix, candidate, candidate);
}
if (candidate instanceof AST_VarDef) {