mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
perf(prettier): check commandjs or amd in CallExpression only (#1491)
This commit is contained in:
parent
064353c97e
commit
79c67d15c0
1 changed files with 5 additions and 1 deletions
|
|
@ -78,7 +78,11 @@ fn print_call_expression_arguments<'a>(
|
|||
|
||||
let callee = expression.callee();
|
||||
let arguments = expression.arguments();
|
||||
let should_break = !is_commons_js_or_amd_call(expression.callee(), arguments);
|
||||
let should_break = if matches!(expression, CallExpressionLike::CallExpression(_)) {
|
||||
!is_commons_js_or_amd_call(expression.callee(), arguments)
|
||||
} else {
|
||||
true
|
||||
};
|
||||
|
||||
if arguments.is_empty() {
|
||||
parts.extend(p.print_inner_comment(Span::new(callee.span().end, expression.span().end)));
|
||||
|
|
|
|||
Loading…
Reference in a new issue