fix: search not returning matches

This commit is contained in:
hsjobeki 2022-12-12 08:03:25 +01:00
parent ae81eb869b
commit 1bfc0acbc9

View File

@ -22,13 +22,10 @@ const search =
return Object.values(item).some((value) => {
if (value) {
if (typeof value === "object" && value.length > 0) {
return value
.join("\n")
.toLocaleLowerCase()
.includes(term.toLowerCase());
return value.join("\n").toLowerCase().includes(term.toLowerCase());
}
const valueAsString = value.toString();
return valueAsString.toLowerCase().includes(term.toLocaleLowerCase());
return valueAsString.toLowerCase().includes(term.toLowerCase());
}
return false;
});