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,
label: theme,
async click() {
@ -257,11 +257,11 @@ export const mainMenuTemplate = async (
});
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();
}
}
})),
})) ?? []),
{ type: 'separator' },
{
label: t(