Skip to content

Commit

Permalink
BC-5461 - Fixed check for undefined props by file permissions (#3324)
Browse files Browse the repository at this point in the history
Co-authored-by: Cedric Evers <[email protected]>
  • Loading branch information
SevenWaysDP and CeEv authored Oct 6, 2023
1 parent 71a73d4 commit cfaa235
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ const FileGetter = (req, res, next) => {
}

const files = result.filter((f) => f).map((file) => {
if (file.permissions[0].refId === userId) {
if (file.permissions[0]?.refId === userId) {
Object.assign(file, {
userIsOwner: true,
});
Expand Down

0 comments on commit cfaa235

Please sign in to comment.