diff options
| author | Eltrac <hi@guhub.cn> | 2025-09-08 12:39:36 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-09-08 12:39:36 +0800 |
| commit | e433ef46d792ccaeb732766e2abbab24ce4a6bbc (patch) | |
| tree | 209fc5a008fbb960b80324ead68f20f4fb26a27a | |
| parent | b8f5c0177fdc636d82b23b6612adc2620c6920b8 (diff) | |
fix: comment count not showing when count is 0
Former-commit-id: fe7ac94a9807f7d604c2f29c205ac9fcb31d7248
| -rw-r--r-- | layouts/_partials/scripts/action-menu-js.html | 2 |
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'; } }); }); |
