diff options
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 |
commit | 2f3785bd381685e97e6cb9fe9f3b69976973930d (patch) | |
tree | ed1d4d97616bec67701d241ffd83b43028886904 /src/content/dependencies/linkAnythingMan.js | |
parent | 09cf76c058c7e42274df33661cfb41c2d73609d1 (diff) |
content: don't access referenceType
Diffstat (limited to 'src/content/dependencies/linkAnythingMan.js')
-rw-r--r-- | src/content/dependencies/linkAnythingMan.js | 14 |
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), }), |