Skip to content

Commit

Permalink
fix(menu): fix menubar items doesn't rendered
Browse files Browse the repository at this point in the history
resolve #2113
  • Loading branch information
Su-Yong committed Jun 7, 2024
1 parent b74c1a0 commit ede1130
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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(
Expand Down

0 comments on commit ede1130

Please sign in to comment.