« get me outta code hell

module-ify album commentary pages - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
author(quasar) nebula <towerofnix@gmail.com>2021-06-04 16:21:58 -0300
committer(quasar) nebula <towerofnix@gmail.com>2021-06-04 16:21:58 -0300
commitc60b3722f23d88680c7ceee72c32ef87545752ea (patch)
treece3e8f4760598d8dcf7089be22e9aab703a25924 /src/util
parent70a1fffacce3bef06562589b06f424d341807528 (diff)
module-ify album commentary pages
Diffstat (limited to 'src/util')
-rw-r--r--src/util/wiki-data.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/wiki-data.js b/src/util/wiki-data.js
index 2527a4b3..87c4b22a 100644
--- a/src/util/wiki-data.js
+++ b/src/util/wiki-data.js
@@ -93,6 +93,10 @@ export function sortByArtDate(data) {
 
 // Specific data utilities
 
+export function filterAlbumsByCommentary(albums) {
+    return albums.filter(album => [album, ...album.tracks].some(x => x.commentary));
+}
+
 export function getAlbumCover(album, {to}) {
     return to('media.albumCover', album.directory);
 }