fix: crash when opening noti settings
This commit is contained in:
parent
ca25639ff0
commit
1c151745e2
1 changed files with 5 additions and 3 deletions
|
|
@ -50,10 +50,12 @@ export function patchPanelUI(unpatches: (() => void | boolean)[]) {
|
||||||
const sections = findInReactTree(
|
const sections = findInReactTree(
|
||||||
res.props.children,
|
res.props.children,
|
||||||
n => n?.children?.[1]?.type === LegacyFormSection
|
n => n?.children?.[1]?.type === LegacyFormSection
|
||||||
).children;
|
)?.children;
|
||||||
|
|
||||||
const index = sections.findIndex((c: any) => titles.includes(c?.props.label));
|
if (sections) {
|
||||||
sections.splice(-~index || 4, 0, <SettingsSection />);
|
const index = sections.findIndex((c: any) => titles.includes(c?.props.label));
|
||||||
|
sections.splice(-~index || 4, 0, <SettingsSection />);
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue