diff --git a/src/lib/ui/settings/patches/panel.tsx b/src/lib/ui/settings/patches/panel.tsx index 6c5d88e..19aab0b 100644 --- a/src/lib/ui/settings/patches/panel.tsx +++ b/src/lib/ui/settings/patches/panel.tsx @@ -50,10 +50,12 @@ export function patchPanelUI(unpatches: (() => void | boolean)[]) { const sections = findInReactTree( res.props.children, n => n?.children?.[1]?.type === LegacyFormSection - ).children; + )?.children; - const index = sections.findIndex((c: any) => titles.includes(c?.props.label)); - sections.splice(-~index || 4, 0, ); + if (sections) { + const index = sections.findIndex((c: any) => titles.includes(c?.props.label)); + sections.splice(-~index || 4, 0, ); + } })); }, true);