From cc13bb6157e251331a50c32839518fdcd96e2351 Mon Sep 17 00:00:00 2001
From: Hamid Reza Mohammadi
Date: Tue, 4 Aug 2026 16:25:07 +0330
Subject: [PATCH] #495 bug fix
---
GanjooRazor/Pages/Partials/GanjoorPage/_CommentPartial.cshtml | 2 +-
RMuseum/Services/Implementation/GanjoorService.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/GanjooRazor/Pages/Partials/GanjoorPage/_CommentPartial.cshtml b/GanjooRazor/Pages/Partials/GanjoorPage/_CommentPartial.cshtml
index 40c6d335..083116f5 100644
--- a/GanjooRazor/Pages/Partials/GanjoorPage/_CommentPartial.cshtml
+++ b/GanjooRazor/Pages/Partials/GanjoorPage/_CommentPartial.cshtml
@@ -52,7 +52,7 @@ else
}
- @foreach (var reply in Model.Comment.Replies)
+ @foreach (var reply in Model.Comment.Replies ?? Array.Empty())
{
}
diff --git a/RMuseum/Services/Implementation/GanjoorService.cs b/RMuseum/Services/Implementation/GanjoorService.cs
index dd9c8b40..b6354021 100644
--- a/RMuseum/Services/Implementation/GanjoorService.cs
+++ b/RMuseum/Services/Implementation/GanjoorService.cs
@@ -1130,7 +1130,7 @@ namespace RMuseum.Services.Implementation
PublishStatus = comment.Status == PublishStatus.Awaiting ? "در انتظار تأیید" : "",
InReplyToId = comment.InReplyToId,
UserId = comment.UserId,
- Replies = { },
+ Replies = Array.Empty(),
CoupletIndex = coupletIndex == null ? -1 : (int)coupletIndex,
MyComment = true,
CoupletSummary = _CutSummary(coupletSummary),