mirror of
https://github.com/Kong/insomnia.git
synced 2026-04-20 14:17:29 -04:00
Fix the bug that the default menu can not be replaced on mac (#8518)
This commit is contained in:
@@ -699,7 +699,13 @@ export function createWindow({ firstLaunch }: { firstLaunch?: boolean } = {}): E
|
||||
template.push(developerMenu);
|
||||
}
|
||||
|
||||
mainBrowserWindow.setMenu(Menu.buildFromTemplate(template));
|
||||
if (isMac()) {
|
||||
Menu.setApplicationMenu(Menu.buildFromTemplate(template));
|
||||
} else {
|
||||
// setMenu only works for Windows and Linux
|
||||
mainBrowserWindow.setMenu(Menu.buildFromTemplate(template));
|
||||
}
|
||||
|
||||
return mainBrowserWindow;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user