« get me outta code hell

fix misordered art lists & chronology links - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/misc-templates.js
diff options
context:
space:
mode:
author(quasar) nebula <towerofnix@gmail.com>2021-08-02 16:15:57 -0300
committer(quasar) nebula <towerofnix@gmail.com>2021-08-02 16:15:57 -0300
commit9ff95d1c338d8a194c91d90b3f8fccf59442da03 (patch)
tree2413c9fe2f4947f9780f764d7f42c96bb312cbe4 /src/misc-templates.js
parent49153bc1b7c6a7a4764004f1359d66bc81c051f6 (diff)
fix misordered art lists & chronology links
Diffstat (limited to 'src/misc-templates.js')
-rw-r--r--src/misc-templates.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/misc-templates.js b/src/misc-templates.js
index d4e4af3..139978d 100644
--- a/src/misc-templates.js
+++ b/src/misc-templates.js
@@ -45,6 +45,7 @@ export function getArtistString(artists, {
 // Chronology links
 
 export function generateChronologyLinks(currentThing, {
+    dateKey = 'date',
     contribKey,
     getThings,
     headingString,
@@ -65,7 +66,7 @@ export function generateChronologyLinks(currentThing, {
     }
 
     return contributions.map(({ who: artist }) => {
-        const things = sortByDate(unique(getThings(artist)));
+        const things = sortByDate(unique(getThings(artist)), dateKey);
         const releasedThings = things.filter(thing => {
             const album = albumData.includes(thing) ? thing : thing.album;
             return !(album && album.directory === UNRELEASED_TRACKS_DIRECTORY);