Skip to content

Commit

Permalink
fix: Args may be nullish
Browse files Browse the repository at this point in the history
  • Loading branch information
franky47 committed Mar 25, 2022
1 parent 84ee37d commit 60c6715
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/encryption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export function decryptOnRead(
) {
// Analyse the query to see if there's anything to decrypt.
const model = models[params.model!]
if (Object.keys(model.fields).length === 0 && !params.args.include) {
if (Object.keys(model.fields).length === 0 && !params.args?.include) {
// The queried model doesn't have any encrypted field,
// and there are no included connections.
// We can safely skip decryption for the returned data.
Expand Down

0 comments on commit 60c6715

Please sign in to comment.