Skip to content

Commit d69be74

Browse files
authored
Simplify if-else clause
1 parent 1de518f commit d69be74

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/CommandLine/Text/HelpText.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,7 @@ public static HelpText AutoBuild<T>(
273273
if (onError != null && parserResult.Tag == ParserResultType.NotParsed)
274274
{
275275
errors = ((NotParsed<T>)parserResult).Errors;
276-
if (errors.IsHelp())
277-
auto = onError(auto);
278-
else if (errors.OnlyMeaningfulOnes().Any())
276+
if (errors.IsHelp() || errors.OnlyMeaningfulOnes().Any())
279277
auto = onError(auto);
280278
}
281279

0 commit comments

Comments
 (0)