« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/things.js')
-rw-r--r--src/data/things.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/data/things.js b/src/data/things.js
index daec610c..035879f1 100644
--- a/src/data/things.js
+++ b/src/data/things.js
@@ -33,7 +33,7 @@ import * as S from './serialize.js';
 
 import {
     getKebabCase,
-    sortByArtDate,
+    sortAlbumsTracksChronologically,
 } from '../util/wiki-data.js';
 
 import find from '../util/find.js';
@@ -1128,8 +1128,10 @@ ArtTag.propertyDescriptors = {
         expose: {
             dependencies: ['albumData', 'trackData'],
             compute: ({ albumData, trackData, [ArtTag.instance]: artTag }) => (
-                sortByArtDate([...albumData, ...trackData]
-                    .filter(thing => thing.artTags?.includes(artTag))))
+                sortAlbumsTracksChronologically(
+                    ([...albumData, ...trackData]
+                        .filter(thing => thing.artTags?.includes(artTag))),
+                    {getDate: o => o.coverArtDate}))
         }
     }
 };