Skip to content

Commit

Permalink
Release 0.5.10
Browse files Browse the repository at this point in the history
  • Loading branch information
dennemark committed Sep 4, 2024
1 parent f880562 commit b1d6faf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@


## [0.5.10](https://github.com/dennemark/prisma-extension-casl/compare/0.5.9...0.5.10) (2024-09-04)


### Bug Fixes

* :bug: return null if filteredQueryResult has no keys ([099e3c2](https://github.com/dennemark/prisma-extension-casl/commit/099e3c28687d72f95eb934897ab192a1d2e23d12))

## [0.5.9](https://github.com/dennemark/prisma-extension-casl/compare/0.5.8...0.5.9) (2024-08-16)


Expand Down
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ function filterQueryResults(result, mask, creationTree, abilities, model) {
hasKeys = true;
}
});
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((x5) => x5);
Expand Down
2 changes: 1 addition & 1 deletion dist/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ function filterQueryResults(result, mask, creationTree, abilities, model) {
hasKeys = true;
}
});
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((x5) => x5);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prisma-extension-casl",
"version": "0.5.9",
"version": "0.5.10",
"description": "Enforce casl abilities on prisma client ",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit b1d6faf

Please sign in to comment.