diff options
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js b/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js index 2892152e..41cb3017 100644 --- a/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js +++ b/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js @@ -19,10 +19,13 @@ export default { query(artist) { const processEntries = (things, details) => - things.map(thing => ({ - thing, - entry: details(thing), - })); + things.flatMap(thing => + thing.commentary + .filter(entry => entry.artists.includes(artist)) + .map(entry => ({ + thing, + entry: details(thing, entry), + }))); const albumEntries = processEntries( |