« get me outta code hell

getChronologyRelations: don't count the same thing twice - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/util/getChronologyRelations.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-04-18 11:22:41 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-04-18 11:22:41 -0300
commit3abf558aa3d9ffeb5a6516b750880f7d4b0ab3de (patch)
treeed49522182d0f9f0a573a762c9555526cebac231 /src/content/util/getChronologyRelations.js
parentf32204abe088563c867289948e5d935de03df39c (diff)
getChronologyRelations: don't count the same thing twice
Diffstat (limited to 'src/content/util/getChronologyRelations.js')
-rw-r--r--src/content/util/getChronologyRelations.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/content/util/getChronologyRelations.js b/src/content/util/getChronologyRelations.js
index cdfdef3..4b7d9ce 100644
--- a/src/content/util/getChronologyRelations.js
+++ b/src/content/util/getChronologyRelations.js
@@ -5,7 +5,7 @@ export default function getChronologyRelations(thing, {
   getThings,
 }) {
   return contributions.map(({who}) => {
-    const things = getThings(who);
+    const things = Array.from(new Set(getThings(who)));
     const index = things.indexOf(thing);
     const previous = things[index - 1];
     const next = things[index + 1];