diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-12-30 14:07:10 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-12-30 16:26:36 -0400 |
commit | 649ed77f4df1cc0fff4354ce0f91e961cfab21d1 (patch) | |
tree | 5194ef863e843a396cb7c7a950b8f8b7feaee4ee | |
parent | bbb470ee09a2803ffe3c8465c6dad9e50080fe19 (diff) |
content: generateAlbumSidebarTrackSection: avoid undefined open
-rw-r--r-- | src/content/dependencies/generateAlbumSidebarTrackSection.js | 29 |
1 files changed, 15 insertions, 14 deletions
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}, |