Skip to content

TypoSuggestionsMiddleware throws an exception if no arguments are provided #321

@taori

Description

@taori

Version 3.6.4

21:28:51.778 ERROR Application terminated in an unexpected way. System.InvalidOperationException: Sequence contains no elements
at System.Linq.ThrowHelper.ThrowNoElementsException()
at System.Linq.Enumerable.Max[TSource](IEnumerable1 source, Func2 selector)
at CommandDotNet.Parsing.TypoSuggestionsMiddleware.<>c__DisplayClass5_0.b__1(String name) in CommandDotNet/Parsing/TypoSuggestionsMiddleware.cs:line 106
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.ToArray() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.OrderedEnumerable1.ToList()
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at CommandDotNet.Parsing.TypoSuggestionsMiddleware.GetSuggestions(IEnumerable1 names, String typo, Int32 maxSuggestionCount) in CommandDotNet/Parsing/TypoSuggestionsMiddleware.cs:line 98
at CommandDotNet.Parsing.TypoSuggestionsMiddleware.TrySuggest(CommandContext ctx, CommandParsingException cpe, IReadOnlyCollection`1 argumentNodes, String argumentNodeType, String prefix) in CommandDotNe
t/Parsing/TypoSuggestionsMiddleware.cs:line 73

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions