Merge pull request #14234 from Budibase/fix/lucene-isempty-filter

Fix issue with nulls in lucene isEmpty filter
This commit is contained in:
Andrew Kingston 2024-07-25 11:16:52 +01:00 committed by GitHub
commit f5c586f814
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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)) { if (Array.isArray(docValue)) {
return docValue.length === 0 return docValue.length === 0
} }
if (typeof docValue === "object") { if (docValue && typeof docValue === "object") {
return Object.keys(docValue).length === 0 return Object.keys(docValue).length === 0
} }
return docValue == null return docValue == null