« get me outta code hell

data: withResolvedContribs: use default "into" - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-09-07 14:53:25 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-09-07 14:53:25 -0300
commit9db4b91c66f8b9b98d098bfe446e29f5b3caee53 (patch)
treeed14a110d8e0cbde112d4faaa9012e6ebdb8c45b /src/data
parentd33effa272c3388640974648fe2888a284c6701c (diff)
data: withResolvedContribs: use default "into"
Diffstat (limited to 'src/data')
-rw-r--r--src/data/things/thing.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/data/things/thing.js b/src/data/things/thing.js
index 19f00b3e..9d8b2ea2 100644
--- a/src/data/things/thing.js
+++ b/src/data/things/thing.js
@@ -286,12 +286,8 @@ export function resolvedReference({ref, data, find}) {
 // properly.)
 export function dynamicContribs(contribsByRefProperty) {
   return compositeFrom(`dynamicContribs`, [
-    withResolvedContribs({
-      from: contribsByRefProperty,
-      into: '#contribs',
-    }),
-
-    exposeDependency({dependency: '#contribs'}),
+    withResolvedContribs({from: contribsByRefProperty}),
+    exposeDependency({dependency: '#resolvedContribs'}),
   ]);
 }
 
@@ -368,7 +364,10 @@ export function commentatorArtists(){
 // providing (named by the second argument) the result. "Resolving"
 // means mapping the "who" reference of each contribution to an artist
 // object, and filtering out those whose "who" doesn't match any artist.
-export function withResolvedContribs({from, into}) {
+export function withResolvedContribs({
+  from,
+  into = '#resolvedContribs',
+}) {
   return compositeFrom(`withResolvedContribs`, [
     raiseWithoutDependency({
       dependency: from,