diff --git a/packages/shared-core/src/filters.ts b/packages/shared-core/src/filters.ts index 6db89dd2f3..65caa9c434 100644 --- a/packages/shared-core/src/filters.ts +++ b/packages/shared-core/src/filters.ts @@ -555,7 +555,7 @@ export const runQuery = (docs: Record[], 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