« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/composite/things/track/inheritFromMainRelease.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/composite/things/track/inheritFromMainRelease.js')
-rw-r--r--src/data/composite/things/track/inheritFromMainRelease.js28
1 files changed, 8 insertions, 20 deletions
diff --git a/src/data/composite/things/track/inheritFromMainRelease.js b/src/data/composite/things/track/inheritFromMainRelease.js
index b1cbb65e..ca532bc7 100644
--- a/src/data/composite/things/track/inheritFromMainRelease.js
+++ b/src/data/composite/things/track/inheritFromMainRelease.js
@@ -1,41 +1,29 @@
 // Early exits with the value for the same property as specified on the
 // main release, if this track is a secondary release, and otherwise continues
 // without providing any further dependencies.
-//
-// Like withMainRelease, this will early exit (with notFoundValue) if the
-// main release is specified by reference and that reference doesn't
-// resolve to anything.
 
 import {input, templateCompositeFrom} from '#composite';
 
 import {exposeDependency, raiseOutputWithoutDependency}
   from '#composite/control-flow';
-
-import withPropertyFromMainRelease
-  from './withPropertyFromMainRelease.js';
+import {withPropertyFromObject} from '#composite/data';
 
 export default templateCompositeFrom({
   annotation: `inheritFromMainRelease`,
 
-  inputs: {
-    notFoundValue: input({
-      defaultValue: null,
-    }),
-  },
-
   steps: () => [
-    withPropertyFromMainRelease({
-      property: input.thisProperty(),
-      notFoundValue: input('notFoundValue'),
-    }),
-
     raiseOutputWithoutDependency({
-      dependency: '#isSecondaryRelease',
+      dependency: 'isSecondaryRelease',
       mode: input.value('falsy'),
     }),
 
+    withPropertyFromObject({
+      object: 'mainReleaseTrack',
+      property: input.thisProperty(),
+    }),
+
     exposeDependency({
-      dependency: '#mainReleaseValue',
+      dependency: '#value',
     }),
   ],
 });