fix bugs
This commit is contained in:
@@ -310,9 +310,19 @@ export function resolveSettingMenu(
|
||||
row: { key?: string; menu?: string | null },
|
||||
groups: SettingGroupDef[]
|
||||
): string {
|
||||
const key = row.key || ''
|
||||
const fromKey = getSettingGroupId(key, groups)
|
||||
const menu = String(row.menu ?? '').trim()
|
||||
if (menu && groups.some((g) => g.id === menu)) return menu
|
||||
return getSettingGroupId(row.key || '', groups)
|
||||
if (menu && groups.some((g) => g.id === menu)) {
|
||||
// menu= misc اشتباه در DB نباید shayegan_/zarin_/… را از گروه اختصاصی پنهان کند
|
||||
if (menu === 'misc' && fromKey !== 'misc') {
|
||||
return fromKey
|
||||
}
|
||||
|
||||
return menu
|
||||
}
|
||||
|
||||
return fromKey
|
||||
}
|
||||
|
||||
/** این کلیدها صفحهٔ جدا دارند و در لیست تنظیمات عادی/پیشرفته نمیآیند */
|
||||
|
||||
Reference in New Issue
Block a user