« get me outta code hell

content: generateArtistInfoPage: fix empty contribution descriptions - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-06-02 19:39:13 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-06-02 19:39:13 -0300
commit5bf775dfc6844a98984309c0945bc99fb1270dd7 (patch)
tree0f024b68f5b519ff96d3adb6e5512f7497ed3b24 /src/content/dependencies
parent0148f49f3e08e6f148e30807669a6c103e3021ff (diff)
content: generateArtistInfoPage: fix empty contribution descriptions
Diffstat (limited to 'src/content/dependencies')
-rw-r--r--src/content/dependencies/generateArtistInfoPage.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/content/dependencies/generateArtistInfoPage.js b/src/content/dependencies/generateArtistInfoPage.js
index c319d08b..d0a7ddf3 100644
--- a/src/content/dependencies/generateArtistInfoPage.js
+++ b/src/content/dependencies/generateArtistInfoPage.js
@@ -42,8 +42,14 @@ export default {
           .map(contribs => contribs.find(({who}) => who === artist))
           .filter(Boolean);
 
-      properties.contributionDescriptions =
-        ownContribs.map(({what}) => what).filter(Boolean);
+      const contributionDescriptions =
+        ownContribs
+          .map(({what}) => what)
+          .filter(Boolean);
+
+      if (!empty(contributionDescriptions)) {
+        properties.contributionDescriptions = contributionDescriptions;
+      }
 
       const otherArtistContribs =
         contribArrays