Skip to content

Commit

Permalink
Access formatters more efficiently. (#7863)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib authored Dec 23, 2024
1 parent f4a062c commit 88580a1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,12 @@ private void TryApplyInputConvention(

var argumentType = _completionContext.GetType<IInputType>(argument.Type!);

var formatter =
argument.Formatters.Count switch
var formatters = argument.GetFormatters();
var formatter = formatters.Count switch
{
0 => null,
1 => argument.Formatters[0],
_ => new AggregateInputValueFormatter(argument.Formatters),
1 => formatters[0],
_ => new AggregateInputValueFormatter(formatters),
};

var defaultValue = argument.DefaultValue;
Expand Down

0 comments on commit 88580a1

Please sign in to comment.