Skip to content

Commit

Permalink
ensure roles[role].registerAccelerator is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Jan 7, 2019
1 parent ba6469b commit ee98c4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/browser/api/menu-item-roles.js
Expand Up @@ -254,7 +254,7 @@ exports.getDefaultAccelerator = (role) => {
}

exports.shouldRegisterAccelerator = (role) => {
const hasRoleRegister = roles.hasOwnProperty(role) && roles[role].registerAccelerator
const hasRoleRegister = roles.hasOwnProperty(role) && roles[role].registerAccelerator !== undefined
return hasRoleRegister ? roles[role].registerAccelerator : true
}

Expand Down

0 comments on commit ee98c4f

Please sign in to comment.