1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-04-26 23:51:26 +02: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
+1 -2
View File
@@ -277,8 +277,7 @@ var Styles = Module("Styles", {
},
addHive: function addHive(name, ref, persist) {
let hive = array.nth(this.hives, h => h.name === name,
0);
let hive = this.hives.find(h => h.name === name);
if (!hive) {
hive = Hive(name, persist);
this.hives.push(hive);