From 5c5b1cebe5d165d013af648598c53ea11d65c817 Mon Sep 17 00:00:00 2001 From: thiloho <123883702+thiloho@users.noreply.github.com> Date: Sun, 27 Apr 2025 11:04:41 +0200 Subject: [PATCH] Update hash removal pattern --- src/pages/tracks.astro | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pages/tracks.astro b/src/pages/tracks.astro index 0b2d641..5cb0159 100644 --- a/src/pages/tracks.astro +++ b/src/pages/tracks.astro @@ -17,10 +17,9 @@ const processedAlbumCovers = albumCovers.map((cover) => { let title = lastDashIndex !== -1 ? filename.substring(lastDashIndex + 3) : ""; - const lastDotIndex = title.lastIndexOf("."); - - if (lastDotIndex !== -1 && import.meta.env.PROD) { - title = filename.substring(0, lastDotIndex); + if (import.meta.env.PROD) { + const lastDotIndex = filename.lastIndexOf("."); + title = lastDotIndex !== -1 ? filename.substring(0, lastDotIndex) : ""; } return { cover, filename, artists, title };