« get me outta code hell

content: don't show chronology info for artists w/ one relevant contrib - 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>2023-08-13 23:29:07 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-08-13 23:29:07 -0300
commit22aecb3c3acbb720b994a835aa8b0dff8382a3ae (patch)
tree36cc5fc760c46518fd60b51467fc67e394712ba3 /src/content
parent3d218700701a42d2b43714ddc63620ee308f354e (diff)
content: don't show chronology info for artists w/ one relevant contrib
Diffstat (limited to 'src/content')
-rw-r--r--src/content/util/getChronologyRelations.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/content/util/getChronologyRelations.js b/src/content/util/getChronologyRelations.js
index 11281e75..036c5586 100644
--- a/src/content/util/getChronologyRelations.js
+++ b/src/content/util/getChronologyRelations.js
@@ -29,6 +29,10 @@ export default function getChronologyRelations(thing, {
 
   return contributions.map(({who}) => {
     const things = Array.from(new Set(getThings(who)));
+    if (things.length === 1) {
+      return;
+    }
+
     const index = things.indexOf(thing);
     const previous = things[index - 1];
     const next = things[index + 1];
@@ -38,5 +42,5 @@ export default function getChronologyRelations(thing, {
       previousLink: previous ? linkThing(previous) : null,
       nextLink: next ? linkThing(next) : null,
     };
-  });
+  }).filter(Boolean);
 }