diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-04-08 18:20:58 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-04-10 16:02:42 -0300 |
commit | a0a7f15520b55043d9321a455a49a33558254aa1 (patch) | |
tree | 45100197560ff46178f33b975ef5d287260b0c69 /src/data/composite/wiki-properties/soupyReverse.js | |
parent | 670d442f1840586085094c9d59d354f8e3b54549 (diff) |
data: constitutibleArtwork & related infrastructure
Diffstat (limited to 'src/data/composite/wiki-properties/soupyReverse.js')
-rw-r--r-- | src/data/composite/wiki-properties/soupyReverse.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/data/composite/wiki-properties/soupyReverse.js b/src/data/composite/wiki-properties/soupyReverse.js index b99c45da..784a66b4 100644 --- a/src/data/composite/wiki-properties/soupyReverse.js +++ b/src/data/composite/wiki-properties/soupyReverse.js @@ -20,12 +20,16 @@ soupyReverse.contributionsBy = }); soupyReverse.artworkContributionsBy = - (bindTo, artworkProperty) => ({ + (bindTo, artworkProperty, {single = false} = {}) => ({ bindTo, referencing: thing => - thing[artworkProperty] - .flatMap(artwork => artwork.artistContribs), + (single + ? (thing[artworkProperty] + ? thing[artworkProperty].artistContribs + : []) + : thing[artworkProperty] + .flatMap(artwork => artwork.artistContribs)), referenced: contrib => [contrib.artist], }); |