diff options
Diffstat (limited to 'src/data/composite/wiki-data')
-rw-r--r-- | src/data/composite/wiki-data/withResolvedReferenceList.js | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/data/composite/wiki-data/withResolvedReferenceList.js b/src/data/composite/wiki-data/withResolvedReferenceList.js index 790a962f..0ac27ae3 100644 --- a/src/data/composite/wiki-data/withResolvedReferenceList.js +++ b/src/data/composite/wiki-data/withResolvedReferenceList.js @@ -7,6 +7,8 @@ import {input, templateCompositeFrom} from '#composite'; import {isString, validateArrayItems} from '#validators'; +import {withMappedList} from '#composite/data'; + import { exitWithoutDependency, raiseOutputWithoutDependency, @@ -49,17 +51,23 @@ export default templateCompositeFrom({ }), { - dependencies: [input('list'), input('data'), input('find')], + dependencies: [input('data'), input('find')], compute: (continuation, { - [input('list')]: list, [input('data')]: data, [input('find')]: findFunction, - }) => - continuation({ - '#matches': list.map(ref => findFunction(ref, data, {mode: 'quiet'})), - }), + }) => continuation({ + ['#map']: + ref => findFunction(ref, data, {mode: 'quiet'}), + }), }, + withMappedList({ + list: input('list'), + map: '#map', + }).outputs({ + '#mappedList': '#matches', + }), + withAvailabilityFilter({ from: '#matches', }), |