From 98b7e95b46838f00c3853bf6a32d4996b76dd98d Mon Sep 17 00:00:00 2001
From: Samuel Newman <mozzius@protonmail.com>
Date: Fri, 7 Feb 2025 22:56:37 +0000
Subject: Fix unknown threadgates causing crashes (#7692)

* fix unknown threadgates

* don't fuck with the styles
---
 src/components/WhoCanReply.tsx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'src/components/WhoCanReply.tsx')

diff --git a/src/components/WhoCanReply.tsx b/src/components/WhoCanReply.tsx
index ab6ef8293..34ac3fe5b 100644
--- a/src/components/WhoCanReply.tsx
+++ b/src/components/WhoCanReply.tsx
@@ -209,7 +209,12 @@ function Rules({
           a.flex_wrap,
           t.atoms.text_contrast_medium,
         ]}>
-        {settings[0].type === 'everybody' ? (
+        {settings.length === 0 ? (
+          <Trans>
+            This post has an unknown type of threadgate on it. Your app may be
+            out of date.
+          </Trans>
+        ) : settings[0].type === 'everybody' ? (
           <Trans>Everybody can reply to this post.</Trans>
         ) : settings[0].type === 'nobody' ? (
           <Trans>Replies to this post are disabled.</Trans>
-- 
cgit 1.4.1

