mirror of
https://github.com/marktext/marktext.git
synced 2025-05-02 19:59:41 +08:00
fix: shortcuts and menus without id not longer work (#984)
This commit is contained in:
parent
a6d97abab7
commit
21d09706a7
@ -303,7 +303,8 @@ const callMenuCallback = (menuInfo, win) => {
|
||||
const menus = Menu.getApplicationMenu()
|
||||
menuItem = menus.getMenuItemById(id)
|
||||
}
|
||||
if (menuItem && menuItem.enabled !== false) {
|
||||
// Allow all shortcuts/menus without id and only enabled menus with id (GH#980).
|
||||
if (!menuItem || menuItem.enabled !== false) {
|
||||
click(menuItem, win)
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user