From 403754d46dcb1d8cf72cf25b49e9b66a5e98140f Mon Sep 17 00:00:00 2001
From: "(quasar) nebula" <qznebula@protonmail.com>
Date: Fri, 15 Apr 2022 18:33:18 -0300
Subject: sort ArtTag.taggedInThings, fixes tag gallery page

---
 src/data/things.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'src/data')

diff --git a/src/data/things.js b/src/data/things.js
index 2d199c10..35ae5cbf 100644
--- a/src/data/things.js
+++ b/src/data/things.js
@@ -32,6 +32,7 @@ import * as S from './serialize.js';
 
 import {
     getKebabCase,
+    sortByArtDate,
 } from '../util/wiki-data.js';
 
 import find from '../util/find.js';
@@ -1055,7 +1056,8 @@ ArtTag.propertyDescriptors = {
         expose: {
             dependencies: ['albumData', 'trackData'],
             compute: ({ albumData, trackData, [ArtTag.instance]: artTag }) => (
-                [...albumData, ...trackData].filter(thing => thing.artTags?.includes(artTag)))
+                sortByArtDate([...albumData, ...trackData]
+                    .filter(thing => thing.artTags?.includes(artTag))))
         }
     }
 };
-- 
cgit 1.3.0-6-gf8a5