diff --git a/new-lamassu-admin/src/pages/Commissions/helper.js b/new-lamassu-admin/src/pages/Commissions/helper.js index a07fff4b..e57b84e8 100644 --- a/new-lamassu-admin/src/pages/Commissions/helper.js +++ b/new-lamassu-admin/src/pages/Commissions/helper.js @@ -40,11 +40,9 @@ const getView = (data, code, compare) => it => { if (!data) return '' // The following boolean should come undefined if it is rendering an unpaired machine - const findAttribute = R.find(R.propEq(compare ?? 'code', it)) + const attribute = R.find(R.propEq(compare ?? 'code', it))(data) - return findAttribute(data) - ? R.compose(R.prop(code), findAttribute)(data) - : 'Unpaired machine' + return attribute ? R.prop(code, attribute) : 'Unpaired machine' } const displayCodeArray = data => it => {