Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Nov 1, 2021
1 parent dc3a5c8 commit b686a30
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/transformers/js/core/src/utils.rs
Expand Up @@ -317,11 +317,10 @@ macro_rules! fold_member_expr_skip_prop {
&mut self,
mut node: swc_ecmascript::ast::MemberExpr,
) -> swc_ecmascript::ast::MemberExpr {
node.obj = node.obj.fold_children_with(self);
node.obj = node.obj.fold_with(self);

// To ensure that fold_expr doesn't replace `require` in non-computed member expressions
if node.computed {
node.prop = node.prop.fold_children_with(self);
node.prop = node.prop.fold_with(self);
}

node
Expand Down

0 comments on commit b686a30

Please sign in to comment.