fix: register accelerator if role has no registerAccelerator (#16309)
* fix: register accelerator if role has no registerAccelerator * ensure roles[role].registerAccelerator is defined
This commit is contained in:
parent
30c670bd83
commit
b71a5a5955
1 changed files with 2 additions and 1 deletions
|
@ -254,7 +254,8 @@ exports.getDefaultAccelerator = (role) => {
|
|||
}
|
||||
|
||||
exports.shouldRegisterAccelerator = (role) => {
|
||||
return roles.hasOwnProperty(role) ? roles[role].registerAccelerator : true
|
||||
const hasRoleRegister = roles.hasOwnProperty(role) && roles[role].registerAccelerator !== undefined
|
||||
return hasRoleRegister ? roles[role].registerAccelerator : true
|
||||
}
|
||||
|
||||
exports.getDefaultSubmenu = (role) => {
|
||||
|
|
Loading…
Reference in a new issue