about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2025-02-07 22:56:37 +0000
committerGitHub <noreply@github.com>2025-02-07 22:56:37 +0000
commit98b7e95b46838f00c3853bf6a32d4996b76dd98d (patch)
tree4a314477b946dad61d5405679961839b62e4a88b
parent7d6adb416af9db37aef7d14a9537cab9a3e83602 (diff)
downloadvoidsky-98b7e95b46838f00c3853bf6a32d4996b76dd98d.tar.zst
Fix unknown threadgates causing crashes (#7692)
* fix unknown threadgates

* don't fuck with the styles
-rw-r--r--src/components/WhoCanReply.tsx7
1 files changed, 6 insertions, 1 deletions
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>