« get me outta code hell

content: generateTrackInfoPageOtherReleasesList: blank if empty - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-06-12 14:03:46 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-06-12 17:32:57 -0300
commit7dba186cc7480b1be2a7d8b4e2c8e1e277568611 (patch)
treecac304d28ef84df00619a50f04903718b65bccd3 /src/content
parentf2df9fb45cda19976cc8710219876134abc8d7ac (diff)
content: generateTrackInfoPageOtherReleasesList: blank if empty
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/generateTrackInfoPage.js4
-rw-r--r--src/content/dependencies/generateTrackInfoPageOtherReleasesList.js2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/content/dependencies/generateTrackInfoPage.js b/src/content/dependencies/generateTrackInfoPage.js
index d44761f6..04e9f274 100644
--- a/src/content/dependencies/generateTrackInfoPage.js
+++ b/src/content/dependencies/generateTrackInfoPage.js
@@ -83,10 +83,8 @@ export default {
 
     // Section: Other releases
 
-    if (!empty(track.otherReleases)) {
-      relations.otherReleasesList =
+    relations.otherReleasesList =
         relation('generateTrackInfoPageOtherReleasesList', track);
-    }
 
     // Section: Contributors
 
diff --git a/src/content/dependencies/generateTrackInfoPageOtherReleasesList.js b/src/content/dependencies/generateTrackInfoPageOtherReleasesList.js
index 5c499760..004bba6d 100644
--- a/src/content/dependencies/generateTrackInfoPageOtherReleasesList.js
+++ b/src/content/dependencies/generateTrackInfoPageOtherReleasesList.js
@@ -44,6 +44,8 @@ export default {
 
   generate: (relations, {html, language}) =>
     html.tag('ul',
+      {[html.onlyIfContent]: true},
+
       stitchArrays({
         trackLink: relations.trackLinks,
         albumLink: relations.albumLinks,