diff options
Diffstat (limited to 'src/content/dependencies')
-rw-r--r-- | src/content/dependencies/generateArtistGalleryPage.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/content/dependencies/generateArtistGalleryPage.js b/src/content/dependencies/generateArtistGalleryPage.js index 39be9d91..11cf8cdf 100644 --- a/src/content/dependencies/generateArtistGalleryPage.js +++ b/src/content/dependencies/generateArtistGalleryPage.js @@ -14,8 +14,16 @@ export default { extraDependencies: ['html', 'language'], query(artist) { - const things = [...artist.albumsAsCoverArtist, ...artist.tracksAsCoverArtist]; - sortAlbumsTracksChronologically(things, {latestFirst: true}); + const things = [ + ...artist.albumsAsCoverArtist, + ...artist.tracksAsCoverArtist, + ]; + + sortAlbumsTracksChronologically(things, { + latestFirst: true, + getDate: thing => thing.coverArtDate ?? thing.date, + }); + return {things}; }, |