« get me outta code hell

data, content: make commentary [] when empty - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateAlbumSidebarTrackSection.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-02-18 16:23:40 -0400
committer(quasar) nebula <qznebula@protonmail.com>2025-03-02 08:23:22 -0400
commit90d484d4ca6525b7184e28f452349e1a3b6e759f (patch)
tree399f0e0547870c8527bc4fe3053d238f38edd844 /src/content/dependencies/generateAlbumSidebarTrackSection.js
parent298b26c82aa7f029f4a640ee1a0a95ac5ab2c4c4 (diff)
data, content: make commentary [] when empty
Diffstat (limited to 'src/content/dependencies/generateAlbumSidebarTrackSection.js')
-rw-r--r--src/content/dependencies/generateAlbumSidebarTrackSection.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/content/dependencies/generateAlbumSidebarTrackSection.js b/src/content/dependencies/generateAlbumSidebarTrackSection.js
index bb788d65..88aea409 100644
--- a/src/content/dependencies/generateAlbumSidebarTrackSection.js
+++ b/src/content/dependencies/generateAlbumSidebarTrackSection.js
@@ -1,3 +1,5 @@
+import {empty} from '#sugar';
+
 export default {
   contentDependencies: ['linkTrack'],
   extraDependencies: ['getColors', 'html', 'language'],
@@ -39,7 +41,7 @@ export default {
 
     data.tracksAreMissingCommentary =
       trackSection.tracks
-        .map(track => !track.commentary);
+        .map(track => empty(track.commentary));
 
     return data;
   },