1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 00:27:57 +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

@@ -2018,7 +2018,7 @@ var ItemList = Class("ItemList", {
if (start < 0 || start >= this.itemCount)
return null;
group = array.nth(groups, g => let (i = start - g.offsets.start) i >= 0 && i < g.itemCount, 0);
group = groups.find(g => let (i = start - g.offsets.start) i >= 0 && i < g.itemCount);
return [group.context, start - group.offsets.start];
},