diff options
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 |
commit | 22aecb3c3acbb720b994a835aa8b0dff8382a3ae (patch) | |
tree | 36cc5fc760c46518fd60b51467fc67e394712ba3 | |
parent | 3d218700701a42d2b43714ddc63620ee308f354e (diff) |
content: don't show chronology info for artists w/ one relevant contrib
-rw-r--r-- | src/content/util/getChronologyRelations.js | 6 |
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); } |