fix: commission override function composition
This commit is contained in:
parent
a5837002bd
commit
4d62506c25
1 changed files with 4 additions and 2 deletions
|
|
@ -40,9 +40,11 @@ const getView = (data, code, compare) => it => {
|
||||||
if (!data) return ''
|
if (!data) return ''
|
||||||
|
|
||||||
// The following boolean should come undefined if it is rendering an unpaired machine
|
// The following boolean should come undefined if it is rendering an unpaired machine
|
||||||
const hasValue = R.find(R.propEq(compare ?? 'code', it))(data)
|
const findAttribute = R.find(R.propEq(compare ?? 'code', it))
|
||||||
|
|
||||||
return hasValue ? R.compose(R.prop(code), hasValue)(data) : 'Unpaired machine'
|
return findAttribute(data)
|
||||||
|
? R.compose(R.prop(code), findAttribute)(data)
|
||||||
|
: 'Unpaired machine'
|
||||||
}
|
}
|
||||||
|
|
||||||
const displayCodeArray = data => it => {
|
const displayCodeArray = data => it => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue