Skip to content

Commit

Permalink
Add a fallback when xref's raw source is null (dotnet#2695)
Browse files Browse the repository at this point in the history
  • Loading branch information
vicancy authored Apr 26, 2018
1 parent 8824720 commit 5e5dcbe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ private void LogInvalidXRefs(List<XRefDetails> unresolvedXRefs)
return;
}

var distinctUids = unresolvedXRefs.Select(i => i.RawSource).Distinct().Select(s => $"\"{HttpUtility.HtmlDecode(s)}\"").ToList();
var distinctUids = unresolvedXRefs.Select(i => i.RawSource ?? i.Uid).Distinct().Select(s => $"\"{HttpUtility.HtmlDecode(s)}\"").ToList();
Logger.LogWarning(
$"{distinctUids.Count} invalid cross reference(s) {distinctUids.ToDelimitedString(", ")}.",
code: WarningCodes.Build.UidNotFound);
Expand Down

0 comments on commit 5e5dcbe

Please sign in to comment.