diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-10-14 17:45:45 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-11-02 22:12:48 -0300 |
commit | 3fc178e77b076837358274821a148e3047378d45 (patch) | |
tree | 11a012684e1b82e5d3e38536f95a265f91732ce0 | |
parent | c65e1e3c36e32cd6b0d8e7ca2f730b71b4185ed9 (diff) |
data: withResolvedSeriesList: empty if null
-rw-r--r-- | src/data/composite/wiki-data/withResolvedSeriesList.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/data/composite/wiki-data/withResolvedSeriesList.js b/src/data/composite/wiki-data/withResolvedSeriesList.js index 97d71f3a..8a4a4f99 100644 --- a/src/data/composite/wiki-data/withResolvedSeriesList.js +++ b/src/data/composite/wiki-data/withResolvedSeriesList.js @@ -3,6 +3,8 @@ import find from '#find'; import {stitchArrays} from '#sugar'; import {isSeriesList} from '#validators'; +import {raiseOutputWithoutDependency} from '#composite/control-flow'; + import { fillMissingListItems, withFlattenedList, @@ -16,12 +18,23 @@ export default templateCompositeFrom({ annotation: `withResolvedSeriesList`, inputs: { - list: input({validate: isSeriesList}), + list: input({ + validate: isSeriesList, + acceptsNull: true, + }), }, outputs: ['#resolvedSeriesList'], steps: () => [ + raiseOutputWithoutDependency({ + dependency: input('list'), + mode: input.value('empty'), + output: input.value({ + ['#resolvedSeriesList']: [], + }), + }), + withPropertiesFromList({ list: input('list'), prefix: input.value('#serieses'), |