From 45d7df9cd9caae93b745265a6b50caabfceb6cab Mon Sep 17 00:00:00 2001
From: "Thomas F. K. Jorna" <thomasfkjorna@gmail.com>
Date: Mon, 2 Aug 2021 00:40:14 +0200
Subject: fix: selecting never will not throw error anymore

---
 components/tweaks.tsx | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

(limited to 'components/tweaks.tsx')

diff --git a/components/tweaks.tsx b/components/tweaks.tsx
index b4733b8..0568c7d 100644
--- a/components/tweaks.tsx
+++ b/components/tweaks.tsx
@@ -1242,7 +1242,11 @@ export const Tweaks = (props: TweakProps) => {
                           colorScheme=""
                           color="black"
                         >
-                          <Text>{mouse.local[0]!.toUpperCase() + mouse.local!.slice(1)}</Text>
+                          <Text>
+                            {mouse.local
+                              ? mouse.local[0]!.toUpperCase() + mouse.local!.slice(1)
+                              : 'Never'}
+                          </Text>
                         </MenuButton>
                         <Portal>
                           {' '}
@@ -1272,7 +1276,11 @@ export const Tweaks = (props: TweakProps) => {
                           colorScheme=""
                           color="black"
                         >
-                          <Text>{mouse.follow[0]!.toUpperCase() + mouse.follow!.slice(1)}</Text>
+                          <Text>
+                            {mouse.follow
+                              ? mouse.follow[0]!.toUpperCase() + mouse.follow!.slice(1)
+                              : 'Never'}
+                          </Text>
                         </MenuButton>
                         <Portal>
                           {' '}
-- 
cgit v1.2.3

