From 1d77ab0adec64e33f48f0de38ab50198b1772e6a Mon Sep 17 00:00:00 2001
From: Hugo C <lumap@duck.com>
Date: Wed, 26 Jul 2023 02:33:00 +0200
Subject: MemberCount: fix family center crash (#1486)

---
 src/plugins/memberCount.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/plugins/memberCount.tsx')

diff --git a/src/plugins/memberCount.tsx b/src/plugins/memberCount.tsx
index 78c10de..f037d74 100644
--- a/src/plugins/memberCount.tsx
+++ b/src/plugins/memberCount.tsx
@@ -106,7 +106,7 @@ export default definePlugin({
         find: ".isSidebarVisible,",
         replacement: {
             match: /(var (\i)=\i\.className.+?children):\[(\i\.useMemo[^}]+"aria-multiselectable")/,
-            replace: "$1:[$2.startsWith('members')?$self.render():null,$3"
+            replace: "$1:[$2?.startsWith('members')?$self.render():null,$3"
         }
     }],
 
-- 
cgit 

