diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-12-07 07:28:58 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-12-07 07:28:58 -0400 |
commit | 0735a45e0ddf693e35202c7c3ef3c15886139843 (patch) | |
tree | 9922c7863f16ce93c4b4aff23e057e5340ebee23 /src | |
parent | 2945d5d207b8a359412392587dab843f9a333fa7 (diff) |
no coverArtDate for albums without cover art either
Diffstat (limited to 'src')
-rw-r--r-- | src/data/things/album.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/data/things/album.js b/src/data/things/album.js index 4890aaaa..281da871 100644 --- a/src/data/things/album.js +++ b/src/data/things/album.js @@ -36,8 +36,14 @@ export class Album extends Thing { update: {validate: isDate}, expose: { - dependencies: ['date'], - transform: (coverArtDate, {date}) => coverArtDate ?? date ?? null, + dependencies: ['date', 'hasCoverArt'], + transform: (coverArtDate, { + date, + hasCoverArt, + }) => + (hasCoverArt + ? coverArtDate ?? date ?? null + : null), }, }, |