re-enable null check against menu item accelerators (#12449)

This commit is contained in:
Shelley Vohr 2018-03-27 20:32:55 -04:00 committed by GitHub
parent 5f7c6ccfe4
commit a677c22e1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,7 +20,7 @@ const delegate = {
getAcceleratorForCommandId: (menu, id, useDefaultAccelerator) => {
const command = menu.commandsMap[id]
if (!command) return
if (command.accelerator) return command.accelerator
if (command.accelerator != null) return command.accelerator
if (useDefaultAccelerator) return command.getDefaultRoleAccelerator()
},
executeCommand: (menu, event, id) => {