diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-08-31 19:59:11 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-09-05 21:02:56 -0300 |
commit | 8e783429194f58909f26c7b11d558d5b0a9b163f (patch) | |
tree | 15f3d1366f6b049bfd9493f3f4c5643d0a7813bb | |
parent | 6325a70991396412eb8e93cee5f17bdb2859ae9d (diff) |
data: clean up bad mapDependencies usages
-rw-r--r-- | src/data/things/track.js | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/data/things/track.js b/src/data/things/track.js index bc9affbe..bf56a6dd 100644 --- a/src/data/things/track.js +++ b/src/data/things/track.js @@ -203,25 +203,15 @@ export class Track extends Thing { }), { - mapDependencies: {contribsFromTrack: '#artistContribs'}, - compute: ({contribsFromTrack}, continuation) => + dependencies: ['#artistContribs'], + compute: ({'#artistContribs': contribsFromTrack}, continuation) => (empty(contribsFromTrack) ? continuation() : contribsFromTrack), }, Track.composite.withAlbumProperty('artistContribs'), - - { - flags: {expose: true}, - expose: { - mapDependencies: {contribsFromAlbum: '#album.artistContribs'}, - compute: ({contribsFromAlbum}) => - (empty(contribsFromAlbum) - ? null - : contribsFromAlbum), - }, - }, + Thing.composite.exposeDependency('#album.artistContribs'), ]), contributorContribs: Thing.composite.from(`Track.contributorContribs`, [ @@ -247,8 +237,8 @@ export class Track extends Thing { }), { - mapDependencies: {contribsFromTrack: '#coverArtistContribs'}, - compute: ({contribsFromTrack}, continuation) => + dependencies: ['#coverArtistContribs'], + compute: ({'#coverArtistContribs': contribsFromTrack}, continuation) => (empty(contribsFromTrack) ? continuation() : contribsFromTrack), |