From 4dcd5323fafd6f1de18568a043312aef4908ef8c Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 6 Feb 2024 21:50:07 -0400 Subject: content: generateAlbumTrackList: handle zero-duration section titles --- src/content/dependencies/generateAlbumTrackList.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/content') diff --git a/src/content/dependencies/generateAlbumTrackList.js b/src/content/dependencies/generateAlbumTrackList.js index 3186306a..089f6e30 100644 --- a/src/content/dependencies/generateAlbumTrackList.js +++ b/src/content/dependencies/generateAlbumTrackList.js @@ -134,13 +134,17 @@ export default { heading.slots({ tag: 'dt', title: - language.$('trackList.section.withDuration', { - section: name, - duration: - language.formatDuration(duration, { - approximate: durationApproximate, - }), - }), + (duration === 0 + ? language.$('trackList.section', { + section: name, + }) + : language.$('trackList.section.withDuration', { + section: name, + duration: + language.formatDuration(duration, { + approximate: durationApproximate, + }), + })), }), html.tag('dd', -- cgit 1.3.0-6-gf8a5