diff --git a/crates/oxc_transformer/src/react/refresh.rs b/crates/oxc_transformer/src/react/refresh.rs index afc3fc220bd927..214808d394a5d5 100644 --- a/crates/oxc_transformer/src/react/refresh.rs +++ b/crates/oxc_transformer/src/react/refresh.rs @@ -797,10 +797,10 @@ impl<'a> ReactRefresh<'a> { } let (binding_identifier, mut arguments) = signature; - arguments.insert(0, Argument::from(expr.clone_in(ctx.ast.allocator))); + arguments.insert(0, Argument::from(ctx.ast.move_expression(expr))); *expr = self.ctx.ast.expression_call( SPAN, - arguments.clone_in(ctx.ast.allocator), + arguments, Self::create_identifier_reference_from_binding_identifier(&binding_identifier, ctx), Option::::None, false,