mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-22 09:25:45 +01:00
Use builtin Array.find rather than array.nth where applicable.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user