Skip to content

Commit

Permalink
refactor(transformer/class-properties): shorten code (#7700)
Browse files Browse the repository at this point in the history
Follow-on after #7697. No need to cast twice. You can go from `MemberExpression` direct to `AssignmentTarget`.
  • Loading branch information
overlookmotel committed Dec 6, 2024
1 parent ab3e1c3 commit e67e981
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,7 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> {
unreachable!()
};
let expr = self.transform_private_field_expression_impl(private_field, true, ctx);
AssignmentTarget::from(SimpleAssignmentTarget::from(expr.into_member_expression()))
AssignmentTarget::from(expr.into_member_expression())
}

/// Duplicate object to be used in get/set pair.
Expand Down

0 comments on commit e67e981

Please sign in to comment.