From d3454859677f7f2342e4fd8d9e725bc831e91be5 Mon Sep 17 00:00:00 2001 From: Jesse Bofill Date: Thu, 27 Jun 2024 14:42:58 -0600 Subject: [PATCH] chore: add null check to temporarily work around component not being found in settings patch --- src/patches/SettingsPatch.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/patches/SettingsPatch.tsx b/src/patches/SettingsPatch.tsx index acac2b7..898ce5c 100644 --- a/src/patches/SettingsPatch.tsx +++ b/src/patches/SettingsPatch.tsx @@ -20,7 +20,7 @@ export const patchSettings = (serverAPI: ServerAPI, tabMasterManager: TabMasterM } afterPatch(ret1, 'type', (_: any, ret2: any) => { - const homeElement = ret2?.props?.children?.props?.pages?.find((obj: any) => obj.route === '/settings/home')?.content?.props?.children[1]; + const homeElement = ret2?.props?.children?.props?.pages?.find((obj: any) => obj.route === '/settings/home')?.content?.props?.children?.[1]; if (homeElement === undefined) { LogController.raiseError("Couldn't find home element to patch in settings"); return ret2;