fix(job-executor/map): paramName handling
This commit is contained in:
parent
d83bf0ebaf
commit
26c5c6152d
@ -61,15 +61,10 @@ const paramsVectorActionsMap = {
|
|||||||
fetchObjects ({ pattern }) {
|
fetchObjects ({ pattern }) {
|
||||||
return filter(this.xo.getObjects(), object => match(pattern, object))
|
return filter(this.xo.getObjects(), object => match(pattern, object))
|
||||||
},
|
},
|
||||||
map ({ collection, iteratee }) {
|
map ({ collection, iteratee, paramName = 'value' }) {
|
||||||
return map(resolveParamsVector.call(this, collection), value => {
|
return map(resolveParamsVector.call(this, collection), value => {
|
||||||
const {
|
|
||||||
paramName = 'value',
|
|
||||||
...iterateeConf
|
|
||||||
} = iteratee
|
|
||||||
|
|
||||||
return resolveParamsVector.call(this, {
|
return resolveParamsVector.call(this, {
|
||||||
...iterateeConf,
|
...iteratee,
|
||||||
[paramName]: value
|
[paramName]: value
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user