mirror of
https://github.com/danbulant/oxc
synced 2026-05-25 04:42:10 +00:00
refactor(transformer/logic-assignment): shorten code (#7419)
Use `create_spanned_read_expression` instead of `create_spanned_expression`, as it's shorter than specifying `ReferenceFlags` manually.
This commit is contained in:
parent
be5f843a12
commit
eb39a50a2e
1 changed files with 1 additions and 1 deletions
|
|
@ -296,7 +296,7 @@ impl<'a, 'ctx> LogicalAssignmentOperators<'a, 'ctx> {
|
||||||
match expr {
|
match expr {
|
||||||
Expression::Identifier(ident) => {
|
Expression::Identifier(ident) => {
|
||||||
let binding = MaybeBoundIdentifier::from_identifier_reference(ident, ctx);
|
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),
|
_ => expr.clone_in(ctx.ast.allocator),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue