mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-23 21:15:46 +01:00
Use builtin Array.find rather than array.nth where applicable.
This commit is contained in:
@@ -1504,8 +1504,7 @@ var Options = Module("options", {
|
||||
|
||||
function val(obj) {
|
||||
if (isArray(opt.defaultValue)) {
|
||||
let val = array.nth(obj, re => (re.key == extra.key),
|
||||
0);
|
||||
let val = Array.find(obj, re => (re.key == extra.key));
|
||||
return val && val.result;
|
||||
}
|
||||
if (hasOwnProperty(opt.defaultValue, extra.key))
|
||||
|
||||
Reference in New Issue
Block a user