Skip to content

Commit

Permalink
refactor(transformer/arrow-function): reserve correct capacity for `V…
Browse files Browse the repository at this point in the history
…ec` (#7319)
  • Loading branch information
overlookmotel committed Nov 17, 2024
1 parent 1821352 commit ed2e515
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ed2e515

Please sign in to comment.