mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-23 07:05:47 +01:00
Replace expression closures (function declarations).
Expression closures are to be axed. See https://bugzil.la/1083458.
This commit is contained in:
@@ -409,7 +409,9 @@ var Addons = Module("addons", {
|
||||
// TODO: handle extension dependencies
|
||||
values(actions).forEach(function (command) {
|
||||
let perm = command.perm && AddonManager["PERM_CAN_" + command.perm.toUpperCase()];
|
||||
function ok(addon) (!perm || addon.permissions & perm) && (!command.filter || command.filter(addon));
|
||||
function ok(addon) {
|
||||
return (!perm || addon.permissions & perm) && (!command.filter || command.filter(addon));
|
||||
}
|
||||
|
||||
commands.add(Array.concat(command.name),
|
||||
command.description,
|
||||
|
||||
Reference in New Issue
Block a user