From 22aecb3c3acbb720b994a835aa8b0dff8382a3ae Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 13 Aug 2023 23:29:07 -0300 Subject: content: don't show chronology info for artists w/ one relevant contrib --- src/content/util/getChronologyRelations.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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); } -- cgit 1.3.0-6-gf8a5