« get me outta code hell

data: annotatedReferenceList: gobble + tolerate null data - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-01-10 23:39:15 -0400
committer(quasar) nebula <qznebula@protonmail.com>2025-01-10 23:39:15 -0400
commit9f81a9395a68e7f1c00e4e0340911c09975eded3 (patch)
treed52a7a8431bc36036090e76be9b187509ee57368 /src
parent691ae4b3019c37c150eb27f077ad398ca835765f (diff)
data: annotatedReferenceList: gobble + tolerate null data
Diffstat (limited to 'src')
-rw-r--r--src/data/composite/wiki-data/withResolvedAnnotatedReferenceList.js8
-rw-r--r--src/data/composite/wiki-properties/annotatedReferenceList.js4
2 files changed, 4 insertions, 8 deletions
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,