Skip to content

Commit

Permalink
fix(*): update comments if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
HoseaCodes committed May 2, 2024
1 parent a4fd351 commit 1281a56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Components/Sticky/StickyFooter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const StickyFooter = ({id, likes, setViewComment, comments, user, article}) => {
</JustifyContent>
<JustifyContent MarginRight>
<FaRegComment onClick={() => handleComment()} /> &nbsp;{" "}
<span>{comments.length - 1 || 0}</span>
<span>{comments.length == 0 ? comments.length - 1 : 0}</span>
</JustifyContent>
</JustifyContent>
<Font2>
Expand Down

0 comments on commit 1281a56

Please sign in to comment.