File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
crates/jsshaker/src/folding Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,8 @@ pub fn maybe_foldable_expr(node: &Expression) -> bool {
113113 match node {
114114 match_member_expression ! ( Expression ) => true ,
115115
116+ Expression :: AssignmentExpression ( _) => false , // Avoid (a=(b=1),1)
117+
116118 Expression :: StringLiteral ( _)
117119 | Expression :: NumericLiteral ( _)
118120 | Expression :: BigIntLiteral ( _)
@@ -141,7 +143,6 @@ pub fn maybe_foldable_expr(node: &Expression) -> bool {
141143 | Expression :: AwaitExpression ( _)
142144 | Expression :: YieldExpression ( _)
143145 | Expression :: ArrayExpression ( _)
144- | Expression :: AssignmentExpression ( _)
145146 | Expression :: ChainExpression ( _)
146147 | Expression :: MetaProperty ( _)
147148 | Expression :: PrivateInExpression ( _)
You can’t perform that action at this time.
0 commit comments