From 8724eb8d6b05bce4ac65d29f237790dba56b82d2 Mon Sep 17 00:00:00 2001 From: "M. Taylor Saotome-Westlake" Date: Sat, 17 Sep 2022 18:06:30 -0700 Subject: [PATCH] JavaScript conditionals require parens as part of the grammar Maybe correctly remembering JavaScript syntax will help me feel less gross. --- theme/static/js/comment_counts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme/static/js/comment_counts.js b/theme/static/js/comment_counts.js index ced469a..3bb5866 100644 --- a/theme/static/js/comment_counts.js +++ b/theme/static/js/comment_counts.js @@ -18,7 +18,7 @@ function placeCommentCounts() { for (let [i, container] of containers.entries()) { let a = document.createElement('a'); let count = counts[i]; - if count === 0 { + if (count === 0) { count = "no"; } let pluralizer = count === 1 ? "" : "s"; -- 2.17.1