electron-create-menu
electron-create-menu copied to clipboard
In electron 16 this package crashes with defaults on macos
The reason is that the default template adds the "help" menu without any sub entries. Add at least 1 submenu item to make it not crash anymore to the help menu
{
role: "help",
label:"Help",
showOn: ["darwin"],
submenu: [
{ label: "Open Some Website", click(e){
shell.openExternal("https://example.com", {
activate: true
});
} },
]
}
Kind of like this :-)
Leaving this here to help potential other people running into this issue
Hmm, that's interesting! Never encountered this because I replace it. I would expect this to just work, given the search bar that's always present in the help menu, and it sounds like something Electron should support. I'll investigate and make an issue there is applicable. Thanks!
I used to never define it, and it showed a first item with (null) that stayed disabled, now I upgraded my app from electron 6 something to the very latest version and started building it on my M1 mac, then I encountered the issue :-)