From 9f81a9395a68e7f1c00e4e0340911c09975eded3 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 10 Jan 2025 23:39:15 -0400 Subject: data: annotatedReferenceList: gobble + tolerate null data --- .../composite/wiki-data/withResolvedAnnotatedReferenceList.js | 8 ++------ src/data/composite/wiki-properties/annotatedReferenceList.js | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'src/data/composite') diff --git a/src/data/composite/wiki-data/withResolvedAnnotatedReferenceList.js b/src/data/composite/wiki-data/withResolvedAnnotatedReferenceList.js index 789a8844..dc16f242 100644 --- a/src/data/composite/wiki-data/withResolvedAnnotatedReferenceList.js +++ b/src/data/composite/wiki-data/withResolvedAnnotatedReferenceList.js @@ -10,6 +10,7 @@ import { withAvailabilityFilter, } from '#composite/control-flow'; +import inputSoupyFind from './inputSoupyFind.js'; import inputNotFoundMode from './inputNotFoundMode.js'; import inputWikiData from './inputWikiData.js'; import raiseResolvedReferenceList from './raiseResolvedReferenceList.js'; @@ -34,7 +35,7 @@ export default templateCompositeFrom({ thing: input({type: 'string', defaultValue: 'thing'}), data: inputWikiData({allowMixedTypes: true}), - find: input({type: 'function'}), + find: inputSoupyFind(), notFoundMode: inputNotFoundMode(), }, @@ -42,11 +43,6 @@ export default templateCompositeFrom({ outputs: ['#resolvedAnnotatedReferenceList'], steps: () => [ - exitWithoutDependency({ - dependency: input('data'), - value: input.value([]), - }), - raiseOutputWithoutDependency({ dependency: input('list'), mode: input.value('empty'), diff --git a/src/data/composite/wiki-properties/annotatedReferenceList.js b/src/data/composite/wiki-properties/annotatedReferenceList.js index d6364475..5dc1df53 100644 --- a/src/data/composite/wiki-properties/annotatedReferenceList.js +++ b/src/data/composite/wiki-properties/annotatedReferenceList.js @@ -12,7 +12,7 @@ import { } from '#validators'; import {exposeDependency} from '#composite/control-flow'; -import {inputWikiData, withResolvedAnnotatedReferenceList} +import {inputSoupyFind, inputWikiData, withResolvedAnnotatedReferenceList} from '#composite/wiki-data'; import {referenceListInputDescriptions, referenceListUpdateDescription} @@ -27,7 +27,7 @@ export default templateCompositeFrom({ ...referenceListInputDescriptions(), data: inputWikiData({allowMixedTypes: true}), - find: input({type: 'function'}), + find: inputSoupyFind(), date: input({ validate: isDate, -- cgit 1.3.0-6-gf8a5