Skip to content

Commit

Permalink
fix: Schema without class level permissions may cause error (#8409)
Browse files Browse the repository at this point in the history
  • Loading branch information
dplewis authored Jan 27, 2023
1 parent cf6966f commit aa2cd51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@

[options]
suppress_comment= \\(.\\|\n\\)*\\@flow-disable-next
esproposal.optional_chaining=enable
6 changes: 2 additions & 4 deletions src/Controllers/DatabaseController.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,8 @@ const filterSensitiveData = (
protectedFields && protectedFields.forEach(k => delete object[k]);

// fields not requested by client (excluded),
//but were needed to apply protecttedFields
perms.protectedFields &&
perms.protectedFields.temporaryKeys &&
perms.protectedFields.temporaryKeys.forEach(k => delete object[k]);
// but were needed to apply protectedFields
perms?.protectedFields?.temporaryKeys?.forEach(k => delete object[k]);
}

for (const key in object) {
Expand Down

0 comments on commit aa2cd51

Please sign in to comment.