From 2f3785bd381685e97e6cb9fe9f3b69976973930d Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 10 Jul 2025 08:51:46 -0300 Subject: content: don't access referenceType --- src/content/dependencies/linkAnythingMan.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/content/dependencies/linkAnythingMan.js') diff --git a/src/content/dependencies/linkAnythingMan.js b/src/content/dependencies/linkAnythingMan.js index e408c1b2..10ce7762 100644 --- a/src/content/dependencies/linkAnythingMan.js +++ b/src/content/dependencies/linkAnythingMan.js @@ -6,19 +6,15 @@ export default { 'linkTrack', ], - query: (thing) => ({ - referenceType: thing.constructor[Symbol.for('Thing.referenceType')], - }), - - relations: (relation, query, thing) => ({ + relations: (relation, thing) => ({ link: - (query.referenceType === 'album' + (thing.isAlbum ? relation('linkAlbum', thing) - : query.referenceType === 'artwork' + : thing.isArtwork ? relation('linkArtwork', thing) - : query.referenceType === 'flash' + : thing.isFlash ? relation('linkFlash', thing) - : query.referenceType === 'track' + : thing.isTrack ? relation('linkTrack', thing) : null), }), -- cgit 1.3.0-6-gf8a5