Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
rzvxa committed Aug 29, 2024
1 parent c6bcbcf commit c9f5f04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/oxc_prettier/src/format/call_arguments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ fn is_hopefully_short_call_argument(mut node: &Expression) -> bool {

fn is_simple_call_argument(node: &Expression, depth: usize) -> bool {
if let Expression::RegExpLiteral(literal) = node {
return literal.regex.pattern.body.span.len() <= 5;
return literal.regex.pattern.body.span.size() <= 5;
}

if node.is_literal() || is_string_word_type(node) {
Expand Down

0 comments on commit c9f5f04

Please sign in to comment.