Skip to content

Commit

Permalink
refactor(transformer/logic-assignment): shorten code (#7419)
Browse files Browse the repository at this point in the history
Use `create_spanned_read_expression` instead of `create_spanned_expression`, as it's shorter than specifying `ReferenceFlags` manually.
  • Loading branch information
overlookmotel committed Nov 22, 2024
1 parent be5f843 commit eb39a50
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ impl<'a, 'ctx> LogicalAssignmentOperators<'a, 'ctx> {
match expr {
Expression::Identifier(ident) => {
let binding = MaybeBoundIdentifier::from_identifier_reference(ident, ctx);
binding.create_spanned_expression(ident.span, ReferenceFlags::Read, ctx)
binding.create_spanned_read_expression(ident.span, ctx)
}
_ => expr.clone_in(ctx.ast.allocator),
}
Expand Down

0 comments on commit eb39a50

Please sign in to comment.