Use Array.some instead of onEach to have better performance
This commit is contained in:
parent
7cd8128da3
commit
e7276006ea
1 changed files with 1 additions and 1 deletions
|
@ -901,7 +901,7 @@ function defocusSearchBar() {
|
||||||
// Names didn't match so let's check if one of the generic types could.
|
// Names didn't match so let's check if one of the generic types could.
|
||||||
if (literalSearch === true) {
|
if (literalSearch === true) {
|
||||||
if (obj.length > GENERICS_DATA && obj[GENERICS_DATA].length > 0) {
|
if (obj.length > GENERICS_DATA && obj[GENERICS_DATA].length > 0) {
|
||||||
return onEach(obj[GENERICS_DATA],
|
return obj[GENERICS_DATA].some(
|
||||||
function(name) {
|
function(name) {
|
||||||
return name === val.name;
|
return name === val.name;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue