From bcafe38dd3ad46fd6b6465a488fd3c1bdb21e2fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Salgado?= Date: Thu, 18 Feb 2021 12:46:24 +0000 Subject: [PATCH] fix: simplify return value --- new-lamassu-admin/src/pages/Commissions/helper.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/new-lamassu-admin/src/pages/Commissions/helper.js b/new-lamassu-admin/src/pages/Commissions/helper.js index 29373827..6abb1af1 100644 --- a/new-lamassu-admin/src/pages/Commissions/helper.js +++ b/new-lamassu-admin/src/pages/Commissions/helper.js @@ -42,9 +42,7 @@ const getView = (data, code, compare) => it => { // The following boolean should come undefined if it is rendering an unpaired machine const hasValue = R.find(R.propEq(compare ?? 'code', it))(data) - return hasValue - ? R.compose(R.prop(code), R.find(R.propEq(compare ?? 'code', it)))(data) - : 'Unpaired machine' + return hasValue ? R.compose(R.prop(code), hasValue)(data) : 'Unpaired machine' } const displayCodeArray = data => it => {