« get me outta code hell

content: generateChronologyLinks: filter no prev/next properly - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-04-23 15:47:31 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-30 20:48:17 -0300
commitad03579e658d15aecc6f9bda693ec6995c9fa8ae (patch)
tree02bf0cd63b6903914c46e1f637bf8631fc961fb6 /src
parent38cba5da6e8e8e06e242a48854c8aacd3d32e2a9 (diff)
content: generateChronologyLinks: filter no prev/next properly
Diffstat (limited to 'src')
-rw-r--r--src/content/dependencies/generateChronologyLinks.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/content/dependencies/generateChronologyLinks.js b/src/content/dependencies/generateChronologyLinks.js
index 0158ffd5..bd798849 100644
--- a/src/content/dependencies/generateChronologyLinks.js
+++ b/src/content/dependencies/generateChronologyLinks.js
@@ -33,8 +33,14 @@ export default {
 
     if (!slots.showOnly) {
       infoSets = infoSets
-        .filter(({nextLink, previousLink}) =>
-          nextLink || previousLink);
+        .map(({contributions, ...entry}) => ({
+          ...entry,
+          contributions:
+            contributions
+              .filter(({nextLink, previousLink}) =>
+                nextLink || previousLink),
+        }))
+        .filter(({contributions}) => !empty(contributions));
     }
 
     const totalContributionCount =