From 93689ad73df449b476cbb69e79f0f6d9c09ebce1 Mon Sep 17 00:00:00 2001
From: Paul Frazee <pfrazee@gmail.com>
Date: Fri, 30 Jun 2023 12:21:30 -0500
Subject: Fix: correctly handle the case where the user has no languages
 configured

---
 src/view/com/posts/FeedItem.tsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'src/view/com/posts/FeedItem.tsx')

diff --git a/src/view/com/posts/FeedItem.tsx b/src/view/com/posts/FeedItem.tsx
index 7354c8a67..7a292378e 100644
--- a/src/view/com/posts/FeedItem.tsx
+++ b/src/view/com/posts/FeedItem.tsx
@@ -66,7 +66,9 @@ export const FeedItem = observer(function ({
   const primaryLanguage = store.preferences.contentLanguages[0] || 'en'
   const translatorUrl = getTranslatorLink(primaryLanguage, record?.text || '')
   const needsTranslation = useMemo(
-    () => !isPostInLanguage(item.post, store.preferences.contentLanguages),
+    () =>
+      store.preferences.contentLanguages.length > 0 &&
+      !isPostInLanguage(item.post, store.preferences.contentLanguages),
     [item.post, store.preferences.contentLanguages],
   )
 
-- 
cgit 1.4.1

