diff options
Diffstat (limited to 'src/data/things')
-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), }, }, |