From 649ed77f4df1cc0fff4354ce0f91e961cfab21d1 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 30 Dec 2023 14:07:10 -0400 Subject: content: generateAlbumSidebarTrackSection: avoid undefined open --- .../generateAlbumSidebarTrackSection.js | 29 +++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'src/content/dependencies/generateAlbumSidebarTrackSection.js') diff --git a/src/content/dependencies/generateAlbumSidebarTrackSection.js b/src/content/dependencies/generateAlbumSidebarTrackSection.js index 589bd900..4f470698 100644 --- a/src/content/dependencies/generateAlbumSidebarTrackSection.js +++ b/src/content/dependencies/generateAlbumSidebarTrackSection.js @@ -96,20 +96,21 @@ export default { data.includesCurrentTrack && {class: 'current'}, - {open: - // Allow forcing open via a template slot. - // This isn't exactly janky, but the rest of this function - // kind of is when you contextualize it in a template... - slots.open || - - // Leave sidebar track sections collapsed on album info page, - // since there's already a view of the full track listing - // in the main content area. - data.isTrackPage && - - // Only expand the track section which includes the track - // currently being viewed by default. - data.includesCurrentTrack}, + // Allow forcing open via a template slot. + // This isn't exactly janky, but the rest of this function + // kind of is when you contextualize it in a template... + slots.open && + {open: true}, + + // Leave sidebar track sections collapsed on album info page, + // since there's already a view of the full track listing + // in the main content area. + data.isTrackPage && + + // Only expand the track section which includes the track + // currently being viewed by default. + data.includesCurrentTrack && + {open: true}, [ html.tag('summary', {style}, -- cgit 1.3.0-6-gf8a5