fix: Fix ratio not appearing if downvotes are 0

This commit is contained in:
Xyphyn committed 2023-07-26 11:44:44 -07:00
1 parent bb8818b17b
commit 607fc7f837
2 files changed
+2 -2

No files matched your search

@@ -32,7 +32,7 @@
<span>•</span>
{/if}
<RelativeDate date={published} />
{#if upvotes && downvotes}
{#if upvotes != undefined && downvotes != undefined}
<span>•</span>
<span>
{Math.floor((upvotes / (upvotes + downvotes || 1)) * 100)}%