From c6a5a51929a26eaae7cc05b8d9ca5eb36169c299 Mon Sep 17 00:00:00 2001 From: Sebastian Mihalache <sebastian.mihalache@gmail.con> Date: Mon, 7 May 2018 16:43:23 +0300 Subject: [PATCH] feat(authsome): fix return in authsome --- packages/xpub-faraday/config/authsome-helpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/xpub-faraday/config/authsome-helpers.js b/packages/xpub-faraday/config/authsome-helpers.js index ff76ff3e9..4a57da8b6 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)) { -- GitLab