Skip to content
This repository was archived by the owner on Jul 19, 2022. It is now read-only.

Commit

Permalink
Fixed an exception being thrown when a capture value was null
Browse files Browse the repository at this point in the history
  • Loading branch information
Laiteux committed Nov 9, 2020
1 parent 046be0b commit 0d8e522
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Milky/Checker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ private void OutputCombo(Combo combo, CheckResult checkResult)
if (checkResult.Captures != null && checkResult.Captures.Count != 0)
{
IEnumerable<string> captures = checkResult.Captures
.Where(c => !string.IsNullOrWhiteSpace(c.Value.ToString())) // If capture.Value.ToString is either null, empty or white-space, we don't want it to be included
.Where(c => c.Value != null && !string.IsNullOrWhiteSpace(c.Value.ToString())) // If capture value is either null, empty or white-space, we don't want it to be included
.Select(c => $"{c.Key} = {c.Value}");

outputBuilder.Append(_outputSettings.CaptureSeparator).AppendJoin(_outputSettings.CaptureSeparator, captures);
Expand Down

0 comments on commit 0d8e522

Please sign in to comment.