Skip to content

Commit

Permalink
perf(transformer/arrow-function): reduce string comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Nov 16, 2024
1 parent d90bc9f commit 2d0e72c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ impl<'a> ArrowFunctionConverter<'a> {

/// Whether to transform the `arguments` identifier.
fn should_transform_arguments_identifier(&self, name: &str, ctx: &mut TraverseCtx<'a>) -> bool {
self.is_async_only() && name == "arguments" && Self::is_affected_arguments_identifier(ctx)
self.is_async_only() && Self::is_affected_arguments_identifier(ctx) && name == "arguments"
}

/// Check if the `arguments` identifier is affected by the transformation.
Expand Down

0 comments on commit 2d0e72c

Please sign in to comment.