« get me outta code hell

content: generateCommentaryIndexPage: handle entries individually - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-11-24 15:40:00 -0400
committer(quasar) nebula <qznebula@protonmail.com>2023-11-24 15:40:00 -0400
commit692bd586495e5fcb6d7c5eae2af6a8c34b380b50 (patch)
treee1ae286b6d1b3f50b3d878df72440efe32481970 /src/content
parentdaf6f5b39ebaf8cf62b0dab72edac41ceff72989 (diff)
content: generateCommentaryIndexPage: handle entries individually
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/generateCommentaryIndexPage.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/content/dependencies/generateCommentaryIndexPage.js b/src/content/dependencies/generateCommentaryIndexPage.js
index 1d381bff..5d38941a 100644
--- a/src/content/dependencies/generateCommentaryIndexPage.js
+++ b/src/content/dependencies/generateCommentaryIndexPage.js
@@ -19,13 +19,13 @@ export default {
       query.albums.map(album =>
         [album, ...album.tracks]
           .filter(({commentary}) => commentary)
-          .map(({commentary}) => commentary));
+          .flatMap(({commentary}) => commentary));
 
     query.wordCounts =
       entries.map(entries =>
         accumulateSum(
           entries,
-          entry => entry.split(' ').length));
+          entry => entry.body.split(' ').length));
 
     query.entryCounts =
       entries.map(entries => entries.length);