diff --git a/src/filterQueryResults.ts b/src/filterQueryResults.ts index 7a0a195..5d08bec 100644 --- a/src/filterQueryResults.ts +++ b/src/filterQueryResults.ts @@ -45,7 +45,7 @@ export function filterQueryResults(result: any, mask: any, creationTree: Creatio } }) - return hasKeys ? entry : null + return hasKeys && Object.keys(entry).length > 0 ? entry : null } if (Array.isArray(result)) { const arr = result.map((entry) => filterPermittedFields(entry)).filter((x) => x)