fix(menu): fix menubar items doesn't rendered

resolve #2113
This commit is contained in:
Su-Yong
2024-06-07 21:16:48 +09:00
parent b74c1a0207
commit ede11307ef

View File

@ -236,7 +236,7 @@ export const mainMenuTemplate = async (
} }
] ]
: []), : []),
...config.get('options.themes')?.map((theme: string) => ({ ...(config.get('options.themes')?.map((theme: string) => ({
type: 'normal' as const, type: 'normal' as const,
label: theme, label: theme,
async click() { async click() {
@ -257,11 +257,11 @@ export const mainMenuTemplate = async (
}); });
if (response === 1) { if (response === 1) {
config.set('options.themes', config.get('options.themes')?.filter((t) => t !== theme)); config.set('options.themes', config.get('options.themes')?.filter((t) => t !== theme) ?? []);
innerRefreshMenu(); innerRefreshMenu();
} }
} }
})), })) ?? []),
{ type: 'separator' }, { type: 'separator' },
{ {
label: t( label: t(