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 | fe7ac94a9807f7d604c2f29c205ac9fcb31d7248 (patch) | |
| tree | 209fc5a008fbb960b80324ead68f20f4fb26a27a /layouts/_partials/scripts | |
| parent | 1db7d0a2b64dda828120bdd0981ffdbf54854c41 (diff) | |
fix: comment count not showing when count is 0
Diffstat (limited to 'layouts/_partials/scripts')
| -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'; } }); }); |
