diff --git a/packages/xpub-faraday/config/authsome-helpers.js b/packages/xpub-faraday/config/authsome-helpers.js index ff76ff3e92d1778824813fbf82da5159dc17566c..4a57da8b656dd7992c438c82307ade57e2bd2e8e 100644 --- a/packages/xpub-faraday/config/authsome-helpers.js +++ b/packages/xpub-faraday/config/authsome-helpers.js @@ -32,7 +32,7 @@ const filterObjectData = (collectionsPermissions, object, user) => { const matchingCollPerm = collectionsPermissions.find( collPerm => object.id === collPerm.fragmentId, ) - if (matchingCollPerm === undefined) return {} + if (matchingCollPerm === undefined) return null if (['reviewer'].includes(matchingCollPerm.permission)) { object.files = omit(object.files, ['coverLetter']) } @@ -42,7 +42,7 @@ const filterObjectData = (collectionsPermissions, object, user) => { const matchingCollPerm = collectionsPermissions.find( collPerm => object.id === collPerm.id, ) - if (matchingCollPerm === undefined) return {} + if (matchingCollPerm === undefined) return null setPublicStatuses(object, matchingCollPerm) parseAuthorsData(object, matchingCollPerm) if (['reviewer', 'handlingEditor'].includes(matchingCollPerm.permission)) {