diff --git a/crates/oxc_transformer/src/common/arrow_function_converter.rs b/crates/oxc_transformer/src/common/arrow_function_converter.rs index 50aea057d9d94..f0b6ab18304f2 100644 --- a/crates/oxc_transformer/src/common/arrow_function_converter.rs +++ b/crates/oxc_transformer/src/common/arrow_function_converter.rs @@ -743,7 +743,8 @@ impl<'a> ArrowFunctionConverter<'a> { let scope_id = ctx.create_child_scope(target_scope_id, ScopeFlags::Arrow | ScopeFlags::Function); - let mut items = ctx.ast.vec_with_capacity(2); + let mut items = + ctx.ast.vec_with_capacity(usize::from(is_computed) + usize::from(is_assignment)); // Create a parameter for the prop if it's a computed member expression. if is_computed {