summaryrefslogtreecommitdiff
path: root/layouts/_partials/scripts
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
commite433ef46d792ccaeb732766e2abbab24ce4a6bbc (patch)
tree209fc5a008fbb960b80324ead68f20f4fb26a27a /layouts/_partials/scripts
parentb8f5c0177fdc636d82b23b6612adc2620c6920b8 (diff)
fix: comment count not showing when count is 0
Former-commit-id: fe7ac94a9807f7d604c2f29c205ac9fcb31d7248
Diffstat (limited to 'layouts/_partials/scripts')
-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';
}
});
});