fix: settings item not showing and not being injected into the correct section
This commit is contained in:
parent
0de40220a1
commit
99f6dbaa34
1 changed files with 7 additions and 11 deletions
|
|
@ -141,17 +141,15 @@ function patchTabsUI(tabs, patches) {
|
||||||
const [config] = args;
|
const [config] = args;
|
||||||
const sections = config.sections;
|
const sections = config.sections;
|
||||||
|
|
||||||
const section = sections?.find((x) => {
|
const section = sections?.find((x) =>
|
||||||
["Bunny", "Kettu", "Revenge"].some(
|
["Bunny", "Kettu", "Revenge"].includes(x?.label)
|
||||||
mod => x.label === mod && x.title === mod
|
);
|
||||||
)
|
|
||||||
});
|
|
||||||
|
|
||||||
// If unable to find a section
|
// If unable to find a section
|
||||||
if(!section) {
|
if(!section) {
|
||||||
const isMainSettings = Boolean(
|
const isMainSettings = Boolean(
|
||||||
sections?.find((x) =>
|
sections?.find((x) =>
|
||||||
x.settings[0] == "PREMIUM"
|
x.settings.includes("ACCOUNT")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -182,17 +180,15 @@ function patchTabsUI(tabs, patches) {
|
||||||
i => i.props?.sections,
|
i => i.props?.sections,
|
||||||
).props;
|
).props;
|
||||||
|
|
||||||
const section = sections?.find((x) =>
|
const section = sections?.find((x) =>
|
||||||
["Bunny", "Kettu", "Revenge"].some(
|
["Bunny", "Kettu", "Revenge"].includes(x?.label)
|
||||||
mod => x.label === mod && x.title === mod,
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// If unable to find a section
|
// If unable to find a section
|
||||||
if(!section) {
|
if(!section) {
|
||||||
const isMainSettings = Boolean(
|
const isMainSettings = Boolean(
|
||||||
sections?.find((x) =>
|
sections?.find((x) =>
|
||||||
x.settings[0] == "PREMIUM"
|
x.settings.includes("ACCOUNT")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue