diff --git a/src/dotnet/APIView/APIViewWeb/Pages/Assemblies/Conversation.cshtml b/src/dotnet/APIView/APIViewWeb/Pages/Assemblies/Conversation.cshtml index 21b33566a93..62383d277cd 100644 --- a/src/dotnet/APIView/APIViewWeb/Pages/Assemblies/Conversation.cshtml +++ b/src/dotnet/APIView/APIViewWeb/Pages/Assemblies/Conversation.cshtml @@ -102,22 +102,25 @@ { int indexA = Model.SampleLines.Count() - Math.Abs(revision.Key.sampleRevisionNumber - skipped); int indexB = int.Parse(thread.Comments.First().ElementId.Split("-").Last()) - 1; - @if (thread.Comments.Any()) - { - var elementId = thread.LineId; + if (Model.SampleLines.Count() > indexA && Model.SampleLines.ElementAt(indexA).Count() > indexB) + { + @if (thread.Comments.Any()) + { + var elementId = thread.LineId; -