From e433ef46d792ccaeb732766e2abbab24ce4a6bbc Mon Sep 17 00:00:00 2001 From: Eltrac Date: Mon, 8 Sep 2025 12:39:36 +0800 Subject: fix: comment count not showing when count is 0 Former-commit-id: fe7ac94a9807f7d604c2f29c205ac9fcb31d7248 --- layouts/_partials/scripts/action-menu-js.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'layouts/_partials') 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'; } }); }); -- cgit v1.2.3