From c9201f74e57b28b539128380b87656bbcbacca7a Mon Sep 17 00:00:00 2001 From: "M. Taylor Saotome-Westlake" Date: Sat, 17 Sep 2022 18:05:16 -0700 Subject: [PATCH] special-case zero for comment count Maybe tweaking some JavaScript will help me feel less gross. --- theme/static/js/comment_counts.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/theme/static/js/comment_counts.js b/theme/static/js/comment_counts.js index 1a3d281..ced469a 100644 --- a/theme/static/js/comment_counts.js +++ b/theme/static/js/comment_counts.js @@ -18,6 +18,9 @@ function placeCommentCounts() { for (let [i, container] of containers.entries()) { let a = document.createElement('a'); let count = counts[i]; + if count === 0 { + count = "no"; + } let pluralizer = count === 1 ? "" : "s"; let text = document.createTextNode(`${count} comment${pluralizer}`); a.appendChild(text); -- 2.17.1