diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-11-16 15:40:40 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-11-17 13:40:01 -0400 |
commit | 89cf67d4348d4ac43df158b265fdac4e48cfe03c (patch) | |
tree | 361cf3b2bca2292461dadfa163405797325f6819 /src/data/composite/wiki-data/withResolvedAnnotatedReferenceList.js | |
parent | 3528fb20886fd0f0490f7cf3c26ae51fb3017727 (diff) |
data: withResolvedAnnotatedReferenceList: availability checks
Diffstat (limited to 'src/data/composite/wiki-data/withResolvedAnnotatedReferenceList.js')
-rw-r--r-- | src/data/composite/wiki-data/withResolvedAnnotatedReferenceList.js | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/data/composite/wiki-data/withResolvedAnnotatedReferenceList.js b/src/data/composite/wiki-data/withResolvedAnnotatedReferenceList.js index 341fdb3d..ac6b15fa 100644 --- a/src/data/composite/wiki-data/withResolvedAnnotatedReferenceList.js +++ b/src/data/composite/wiki-data/withResolvedAnnotatedReferenceList.js @@ -3,9 +3,14 @@ import {stitchArrays} from '#sugar'; import {isString, optional, validateArrayItems, validateProperties} from '#validators'; -import {withAvailabilityFilter} from '#composite/control-flow'; import {withPropertiesFromList} from '#composite/data'; +import { + exitWithoutDependency, + raiseOutputWithoutDependency, + withAvailabilityFilter, +} from '#composite/control-flow'; + import inputNotFoundMode from './inputNotFoundMode.js'; import inputWikiData from './inputWikiData.js'; import raiseResolvedReferenceList from './raiseResolvedReferenceList.js'; @@ -35,6 +40,19 @@ export default templateCompositeFrom({ outputs: ['#resolvedAnnotatedReferenceList'], steps: () => [ + exitWithoutDependency({ + dependency: input('data'), + value: input.value([]), + }), + + raiseOutputWithoutDependency({ + dependency: input('list'), + mode: input.value('empty'), + output: input.value({ + ['#resolvedAnnotatedReferenceList']: [], + }), + }), + withPropertiesFromList({ list: input('list'), properties: input.value([ |