summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-09-08 12:39:36 +0800
committerEltrac <hi@guhub.cn>2025-09-08 12:39:36 +0800
commitfe7ac94a9807f7d604c2f29c205ac9fcb31d7248 (patch)
tree209fc5a008fbb960b80324ead68f20f4fb26a27a
parent1db7d0a2b64dda828120bdd0981ffdbf54854c41 (diff)
fix: comment count not showing when count is 0
-rw-r--r--layouts/_partials/scripts/action-menu-js.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/_partials/scripts/action-menu-js.html b/layouts/_partials/scripts/action-menu-js.html
index 7c072631..699496dd 100644
--- a/layouts/_partials/scripts/action-menu-js.html
+++ b/layouts/_partials/scripts/action-menu-js.html
@@ -66,7 +66,7 @@ function initializeCommentCount() {
const discussion = giscusData.giscus.discussion;
const totalComments = (discussion.totalCommentCount || 0) + (discussion.totalReplyCount || 0);
// set comment count
- commentCountEl.textContent = totalComments.toString();
+ commentCountEl.textContent = totalComments.toString() || '0';
}
});
});