From e2df11974850e3e890d3fdb4573947abc804e505 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 23 Apr 2024 16:57:13 -0300 Subject: content: generateTrackChronologyLinks: count contributions properly --- src/content/dependencies/generateTrackChronologyLinks.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/content/dependencies/generateTrackChronologyLinks.js b/src/content/dependencies/generateTrackChronologyLinks.js index e30dd9ba..15c2cae9 100644 --- a/src/content/dependencies/generateTrackChronologyLinks.js +++ b/src/content/dependencies/generateTrackChronologyLinks.js @@ -116,12 +116,12 @@ export default { ]; const totalContributionCount = - accumulateSum( - contents.flatMap(content => [ - content.artistChronologyContributions, - content.coverArtistChronologyContributions, - ]), - contributions => contributions.length); + Math.max(... + contents.map(content => + accumulateSum([ + content.artistChronologyContributions, + content.coverArtistChronologyContributions, + ], contributions => contributions.length))); relations.scopeSwitcher.setSlots({ scopes, -- cgit 1.3.0-6-gf8a5