« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util/wiki-data.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/wiki-data.js')
-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);
 }