diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-09-09 08:13:44 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-09-09 08:14:11 -0300 |
commit | c82784ebb4e5141bfe97664f3252303b3e833863 (patch) | |
tree | 5f4dfa5d990ca83d5eec71faccb95d84935a870a /src/data/things/thing.js | |
parent | 6fe22802d8220b983a488f4efee1834bacbdb166 (diff) |
data: withPropertyFrom{Object,List}, fillMissingListItems utils
Diffstat (limited to 'src/data/things/thing.js')
-rw-r--r-- | src/data/things/thing.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/data/things/thing.js b/src/data/things/thing.js index 96ac9b12..a87e6ed6 100644 --- a/src/data/things/thing.js +++ b/src/data/things/thing.js @@ -15,6 +15,7 @@ import { exposeDependency, exposeDependencyOrContinue, raiseWithoutDependency, + withPropertyFromList, withUpdateValueAsDependency, } from '#composite'; @@ -408,14 +409,8 @@ export function withResolvedContribs({ raise: {into: []}, }), - { - mapDependencies: {from}, - compute: ({from}, continuation) => - continuation({ - '#artistRefs': from.map(({who}) => who), - '#what': from.map(({what}) => what), - }), - }, + withPropertyFromList({list: from, property: 'who', into: '#artistRefs'}), + withPropertyFromList({list: from, property: 'what', into: '#what'}), withResolvedReferenceList({ list: '#artistRefs', |