From 3fc178e77b076837358274821a148e3047378d45 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 14 Oct 2024 17:45:45 -0300 Subject: data: withResolvedSeriesList: empty if null --- src/data/composite/wiki-data/withResolvedSeriesList.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src') 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'), -- cgit 1.3.0-6-gf8a5