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(
|
||||
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, <SettingsSection />);
|
||||
if (sections) {
|
||||
const index = sections.findIndex((c: any) => titles.includes(c?.props.label));
|
||||
sections.splice(-~index || 4, 0, <SettingsSection />);
|
||||
}
|
||||
}));
|
||||
}, true);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue