fix corner case with arguments (#4697)

fixes #4696
This commit is contained in:
Alex Lam S.L
2021-02-27 01:26:15 +00:00
committed by GitHub
parent ba4a771bbc
commit 0a42457df6
3 changed files with 24 additions and 1 deletions

View File

@@ -108,6 +108,7 @@ function is_lhs(node, parent) {
if (parent instanceof AST_DefaultValue) return parent.name === node && node;
if (parent instanceof AST_Destructured) return node;
if (parent instanceof AST_DestructuredKeyVal) return node;
if (parent instanceof AST_ForEnumeration) return parent.init === node && node;
if (parent instanceof AST_Unary) return unary_side_effects[parent.operator] && parent.expression;
}