« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/linkAnythingMan.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies/linkAnythingMan.js')
-rw-r--r--src/content/dependencies/linkAnythingMan.js14
1 files changed, 5 insertions, 9 deletions
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),
   }),