fix: Fix ratio not appearing if downvotes are 0
This commit is contained in:
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)}%
|
||||
|
||||
Reference in new issue
Block a user