« get me outta code hell

content: generateAlbumSidebarTrackSection: fix error w/o color - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-02-02 21:38:06 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-02-10 13:30:25 -0400
commit694dd3ccd0ce447b3ebab6f1a65585206b4b69fc (patch)
treef4842973c9577653bdbc0e6b791213a76f59bbbd /src/content/dependencies
parent6bbe25371fdf5ee42e988e03ac94745826c88d35 (diff)
content: generateAlbumSidebarTrackSection: fix error w/o color
Diffstat (limited to 'src/content/dependencies')
-rw-r--r--src/content/dependencies/generateAlbumSidebarTrackSection.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/content/dependencies/generateAlbumSidebarTrackSection.js b/src/content/dependencies/generateAlbumSidebarTrackSection.js
index 4f470698..aa5c723d 100644
--- a/src/content/dependencies/generateAlbumSidebarTrackSection.js
+++ b/src/content/dependencies/generateAlbumSidebarTrackSection.js
@@ -61,10 +61,10 @@ export default {
           ? language.$('albumSidebar.trackList.fallbackSectionName')
           : data.name));
 
-    let style;
+    let colorStyle;
     if (data.color) {
       const {primary} = getColors(data.color);
-      style = `--primary-color: ${primary}`;
+      colorStyle = {style: `--primary-color: ${primary}`};
     }
 
     const trackListItems =
@@ -113,7 +113,9 @@ export default {
         {open: true},
 
       [
-        html.tag('summary', {style},
+        html.tag('summary',
+          colorStyle,
+
           html.tag('span',
             (data.hasTrackNumbers
               ? language.$('albumSidebar.trackList.group.withRange', {