« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/page/track.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/page/track.js')
-rw-r--r--src/page/track.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/page/track.js b/src/page/track.js
index d51cee21..04e00ee3 100644
--- a/src/page/track.js
+++ b/src/page/track.js
@@ -19,7 +19,7 @@ import {
 import {
     getTrackCover,
     getAlbumListTag,
-    sortByDate
+    sortChronologically,
 } from '../util/wiki-data.js';
 
 // Page exports
@@ -36,8 +36,15 @@ export function write(track, {wikiData}) {
 
     let flashesThatFeature;
     if (wikiInfo.enableFlashesAndGames) {
-        flashesThatFeature = sortByDate([track, ...otherReleases]
-            .flatMap(track => track.featuredInFlashes.map(flash => ({flash, as: track}))));
+        flashesThatFeature = sortChronologically([track, ...otherReleases]
+            .flatMap(track => track.featuredInFlashes
+                .map(flash => ({
+                    flash,
+                    as: track,
+                    directory: flash.directory,
+                    name: flash.name,
+                    date: flash.date
+                }))));
     }
 
     const unbound_getTrackItem = (track, {getArtistString, link, language}) => (