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/track.js | |
parent | 6fe22802d8220b983a488f4efee1834bacbdb166 (diff) |
data: withPropertyFrom{Object,List}, fillMissingListItems utils
Diffstat (limited to 'src/data/things/track.js')
-rw-r--r-- | src/data/things/track.js | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/data/things/track.js b/src/data/things/track.js index 53798cd..a307fda 100644 --- a/src/data/things/track.js +++ b/src/data/things/track.js @@ -11,6 +11,7 @@ import { exposeDependency, exposeDependencyOrContinue, exposeUpdateValueOrContinue, + withPropertyFromObject, withResultOfAvailabilityCheck, withUpdateValueAsDependency, } from '#composite'; @@ -430,20 +431,7 @@ function withAlbumProperty({ }) { return compositeFrom(`withAlbumProperty`, [ withAlbum({notFoundMode}), - - { - dependencies: ['#album'], - options: {property}, - mapContinuation: {into}, - - compute: ({ - '#album': album, - '#options': {property}, - }, continuation) => - (album - ? continuation.raise({into: album[property]}) - : continuation.raise({into: null})), - }, + withPropertyFromObject({object: '#album', property, into}), ]); } |