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 committed Dec 24, 2024
1 parent 72eda6f commit 239719c
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 239719c

Please sign in to comment.