1
Fork 0

Use Array.some instead of onEach to have better performance

This commit is contained in:
Guillaume Gomez 2021-01-08 14:52:12 +01:00
parent 7cd8128da3
commit e7276006ea

View file

@ -901,7 +901,7 @@ function defocusSearchBar() {
// Names didn't match so let's check if one of the generic types could.
if (literalSearch === true) {
if (obj.length > GENERICS_DATA && obj[GENERICS_DATA].length > 0) {
return onEach(obj[GENERICS_DATA],
return obj[GENERICS_DATA].some(
function(name) {
return name === val.name;
});