Skip to content

Commit

Permalink
chore: add null check to temporarily work around component not being …
Browse files Browse the repository at this point in the history
…found in settings patch
  • Loading branch information
jessebofill committed Jun 27, 2024
1 parent 01fa79f commit d345485
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/patches/SettingsPatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d345485

Please sign in to comment.