« get me outta code hell

content: don't access referenceType - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/linkArtwork.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-07-10 08:51:46 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-07-10 08:51:46 -0300
commit2f3785bd381685e97e6cb9fe9f3b69976973930d (patch)
treeed1d4d97616bec67701d241ffd83b43028886904 /src/content/dependencies/linkArtwork.js
parent09cf76c058c7e42274df33661cfb41c2d73609d1 (diff)
content: don't access referenceType
Diffstat (limited to 'src/content/dependencies/linkArtwork.js')
-rw-r--r--src/content/dependencies/linkArtwork.js11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/content/dependencies/linkArtwork.js b/src/content/dependencies/linkArtwork.js
index 8cd6f359..c10150d1 100644
--- a/src/content/dependencies/linkArtwork.js
+++ b/src/content/dependencies/linkArtwork.js
@@ -1,16 +1,11 @@
 export default {
   contentDependencies: ['linkAlbum', 'linkTrack'],
 
-  query: (artwork) => ({
-    referenceType:
-      artwork.thing.constructor[Symbol.for('Thing.referenceType')],
-  }),
-
-  relations: (relation, query, artwork) => ({
+  relations: (relation, artwork) => ({
     link:
-      (query.referenceType === 'album'
+      (artwork.thing.isAlbum
         ? relation('linkAlbum', artwork.thing)
-     : query.referenceType === 'track'
+     : artwork.thing.isTrack
         ? relation('linkTrack', artwork.thing)
         : null),
   }),