Underscore.js _.find() to native Array.find()

This commit is contained in:
djmaze 2020-07-22 10:43:19 +02:00
parent 2404f6466d
commit 9c0072d626
19 changed files with 55 additions and 79 deletions

View file

@ -180,7 +180,7 @@ class Selector {
} else if (0 < aItems.length) {
if (null !== isNextFocused) {
getNext = false;
isNextFocused = _.find(aCache, (sUid) => {
isNextFocused = aCache.find(sUid => {
if (getNext && uids.includes(sUid)) {
return sUid;
} else if (isNextFocused === sUid) {
@ -190,7 +190,7 @@ class Selector {
});
if (isNextFocused) {
temp = _.find(aItems, (oItem) => isNextFocused === this.getItemUid(oItem));
temp = aItems.find(oItem => isNextFocused === this.getItemUid(oItem));
}
}