From 3abf558aa3d9ffeb5a6516b750880f7d4b0ab3de Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 18 Apr 2023 11:22:41 -0300 Subject: getChronologyRelations: don't count the same thing twice --- src/content/util/getChronologyRelations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/content') diff --git a/src/content/util/getChronologyRelations.js b/src/content/util/getChronologyRelations.js index cdfdef39..4b7d9ce5 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]; -- cgit 1.3.0-6-gf8a5