From 607fc7f837f2bf1d9252f9187cc54cffca457eff Mon Sep 17 00:00:00 2001 From: Xyphyn Date: Wed, 26 Jul 2023 11:44:44 -0700 Subject: [PATCH] fix: Fix ratio not appearing if downvotes are 0 --- src/lib/components/lemmy/post/Post.svelte | 2 +- src/lib/components/lemmy/post/PostMeta.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/lemmy/post/Post.svelte b/src/lib/components/lemmy/post/Post.svelte index 9cf83812..957e50b1 100644 --- a/src/lib/components/lemmy/post/Post.svelte +++ b/src/lib/components/lemmy/post/Post.svelte @@ -16,7 +16,7 @@
-
+
• {/if} - {#if upvotes && downvotes} + {#if upvotes != undefined && downvotes != undefined} • {Math.floor((upvotes / (upvotes + downvotes || 1)) * 100)}%