« get me outta code hell

data: withContributionContext: guard missing dependencies - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/composite/things
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-03-07 12:21:15 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-06-12 17:26:41 -0300
commit33944781fea780b2fdd714da45720631b7a21ba2 (patch)
treee8aaa30bf62b725859e41517e15b4bdec98b9dbf /src/data/composite/things
parent2ecbfea7c451abb422db3b6c29b26825e1a824a4 (diff)
data: withContributionContext: guard missing dependencies
Diffstat (limited to 'src/data/composite/things')
-rw-r--r--src/data/composite/things/contribution/withContributionContext.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/data/composite/things/contribution/withContributionContext.js b/src/data/composite/things/contribution/withContributionContext.js
index 83ad5b73..3c1c31c0 100644
--- a/src/data/composite/things/contribution/withContributionContext.js
+++ b/src/data/composite/things/contribution/withContributionContext.js
@@ -1,6 +1,6 @@
 import {input, templateCompositeFrom} from '#composite';
 
-import {withPropertiesFromObject} from '#composite/data';
+import {raiseOutputWithoutDependency} from '#composite/control-flow';
 
 export default templateCompositeFrom({
   annotation: `withContributionContext`,
@@ -11,6 +11,22 @@ export default templateCompositeFrom({
   ],
 
   steps: () => [
+    raiseOutputWithoutDependency({
+      dependency: 'thing',
+      output: input.value({
+        '#contributionTarget': null,
+        '#contributionProperty': null,
+      }),
+    }),
+
+    raiseOutputWithoutDependency({
+      dependency: 'thingProperty',
+      output: input.value({
+        '#contributionTarget': null,
+        '#contributionProperty': null,
+      }),
+    }),
+
     {
       dependencies: ['thing', 'thingProperty'],