mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-03 04:35:45 +01:00
Use builtin Array.find rather than array.nth where applicable.
This commit is contained in:
@@ -243,7 +243,7 @@ var ConfigBase = Class("ConfigBase", {
|
||||
bestLocale: function (list) {
|
||||
return values([this.appLocale, this.appLocale.replace(/-.*/, ""),
|
||||
"en", "en-US", list[0]])
|
||||
.nth((function (l) this.has(l)).bind(RealSet(list)), 0);
|
||||
.find(bind("has", RealSet(list)));
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user