1
0
Fork 0
mirror of synced 2024-09-20 19:33:10 +12:00

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

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