File tree Expand file tree Collapse file tree
src/dotnet/APIView/APIViewWeb/Pages/Assemblies Expand file tree Collapse file tree Original file line number Diff line number Diff line change 102102 {
103103 int indexA = Model .SampleLines .Count () - Math .Abs (revision .Key .sampleRevisionNumber - skipped );
104104 int indexB = int .Parse (thread .Comments .First ().ElementId .Split (" -" ).Last ()) - 1 ;
105- @if (thread .Comments .Any ())
106- {
107- var elementId = thread .LineId ;
105+ if (Model .SampleLines .Count () > indexA && Model .SampleLines .ElementAt (indexA ).Count () > indexB )
106+ {
107+ @if (thread .Comments .Any ())
108+ {
109+ var elementId = thread .LineId ;
108110
109- <tr class =" code-line" >
110- <td class =" code p-2" style =" word-break : break-all ;" >
111- <a class =" comment-url" asp-page =" Samples"
112- asp-route-id =@Model.Review.Id
113- asp-route-revisionId =@thread.Comments.First().ElementId.Split( " -" ).First()
114- asp-fragment =@Uri.EscapeDataString(elementId) >
115- @Html.Raw(Model.SampleLines.ElementAt(indexA).ElementAt(indexB))
116- </a >
117- </td >
118- </tr >
119- }
120- <partial name =" _CommentThreadPartial" model =" @thread" />
111+ < tr class = " code-line" >
112+ < td class = " code p-2" style = " word-break: break-all;" >
113+ < a class = " comment-url" asp - page = " Samples"
114+ asp - route - id = @Model .Review .Id
115+ asp - route - revisionId = @thread .Comments .First ().ElementId .Split (" -" ).First ()
116+ asp - fragment = @Uri .EscapeDataString (elementId )>
117+ @Html .Raw (Model .SampleLines .ElementAt (indexA ).ElementAt (indexB ))
118+ < / a >
119+ < / td >
120+ < / tr >
121+ }
122+ < partial name = " _CommentThreadPartial" model = " @thread" / >
123+ }
121124 }
122125 </table >
123126 </div >
You can’t perform that action at this time.
0 commit comments