Skip to content

Commit 57e9dcf

Browse files
committed
refactor(transformer/arrow-functions): shorten AstBuilder call (#8317)
Follow-on after #8024. Pure refactor, just shorten code.
1 parent ec88c68 commit 57e9dcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/oxc_transformer/src/common/arrow_function_converter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ impl<'a> ArrowFunctionConverter<'a> {
10881088
.visit_statements(statements);
10891089
None
10901090
} else {
1091-
Some(Expression::ThisExpression(ctx.ast.alloc_this_expression(SPAN)))
1091+
Some(ctx.ast.expression_this(SPAN))
10921092
};
10931093
Self::adjust_binding_scope(target_scope_id, &this_var, ctx);
10941094
let variable_declarator = ctx.ast.variable_declarator(

0 commit comments

Comments
 (0)