Fix issue with nulls in lucene isEmpty filter

This commit is contained in:
Andrew Kingston 2024-07-24 14:29:02 +01:00
parent 0fb9c78551
commit 32dd47804f
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -555,7 +555,7 @@ export const runQuery = (docs: Record<string, any>[], query: SearchFilters) => {
if (Array.isArray(docValue)) {
return docValue.length === 0
}
if (typeof docValue === "object") {
if (docValue && typeof docValue === "object") {
return Object.keys(docValue).length === 0
}
return docValue == null