1
0
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:
Kris Maglione
2014-02-22 14:57:23 -08:00
parent 414a165e9c
commit 6790c62c41
14 changed files with 58 additions and 43 deletions

View File

@@ -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))