From 78eaf0efe628f5e5b08e54d66a2ddaa8f7ee859e Mon Sep 17 00:00:00 2001 From: natjms Date: Tue, 29 Mar 2022 21:03:32 -0700 Subject: [PATCH] Add check to prevent comments from being listed as undefined. Fixes #34 --- src/components/posts/post.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/posts/post.js b/src/components/posts/post.js index 0456071..7f30c07 100644 --- a/src/components/posts/post.js +++ b/src/components/posts/post.js @@ -68,7 +68,7 @@ export const RawPostJsx = (props) => { const repliesCount = props.data.replies_count; let commentsText; - if (repliesCount == 0) { + if (repliesCount == 0 || repliesCount == undefined) { commentsText = "View comments"; } else { commentsText = "View "