From 690a7b53a72ac71f9f76260fa50c634566c4e984 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 28 Nov 2022 23:25:05 -0400 Subject: divide things.js into modular files (hilariously) --- src/misc-templates.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/misc-templates.js') diff --git a/src/misc-templates.js b/src/misc-templates.js index 0a33648..83aae19 100644 --- a/src/misc-templates.js +++ b/src/misc-templates.js @@ -2,7 +2,7 @@ // These are made available right on a page spec's ({wikiData, language, ...}) // args object! -import {Track, Album} from './data/things.js'; +import T from './data/things/index.js'; import { empty, @@ -173,7 +173,7 @@ function unbound_generateChronologyLinks(currentThing, { // right function to use here. const args = [thingsUnsorted, {getDate: (t) => t[dateKey]}]; const things = ( - thingsUnsorted.every(t => t instanceof Album || t instanceof Track) + thingsUnsorted.every(t => t instanceof T.Album || t instanceof T.Track) ? sortAlbumsTracksChronologically(...args) : sortChronologically(...args)); -- cgit 1.3.0-6-gf8a5