Skip to content

Commit

Permalink
fix: 🐛 return null if filteredQueryResult has no keys
Browse files Browse the repository at this point in the history
  • Loading branch information
dennemark committed Sep 4, 2024
1 parent 6229c1e commit 099e3c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/filterQueryResults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 099e3c2

Please sign in to comment.