Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve bug in Conversation Page #8343

Merged
merged 1 commit into from
May 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;

<tr class="code-line">
<td class="code p-2" style="word-break: break-all;">
<a class="comment-url" asp-page="Samples"
[email protected]
[email protected]().ElementId.Split("-").First()
[email protected](elementId)>
@Html.Raw(Model.SampleLines.ElementAt(indexA).ElementAt(indexB))
</a>
</td>
</tr>
}
<partial name="_CommentThreadPartial" model="@thread" />
<tr class="code-line">
<td class="code p-2" style="word-break: break-all;">
<a class="comment-url" asp-page="Samples"
[email protected]
[email protected]().ElementId.Split("-").First()
[email protected](elementId)>
@Html.Raw(Model.SampleLines.ElementAt(indexA).ElementAt(indexB))
</a>
</td>
</tr>
}
<partial name="_CommentThreadPartial" model="@thread" />
}
}
</table>
</div>
Expand Down