« 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/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/util')
-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);
 }