diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-04-23 16:57:13 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-05-30 20:48:18 -0300 |
commit | e2df11974850e3e890d3fdb4573947abc804e505 (patch) | |
tree | 7fce43055a785058d0767622d3b7946dfceddf63 | |
parent | b1fc03df98d7618f5a5189089bd810f243e9aa8c (diff) |
content: generateTrackChronologyLinks: count contributions properly
-rw-r--r-- | src/content/dependencies/generateTrackChronologyLinks.js | 12 |
1 files changed, 6 insertions, 6 deletions
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, |