From 953b39dba90421c24647e5f11bd5718ad46aa212 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Thu, 19 Oct 2023 14:28:04 -0700 Subject: [PATCH] fix: formatting --- netlify/edge-functions/now-playing.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/netlify/edge-functions/now-playing.js b/netlify/edge-functions/now-playing.js index 544bff40..51c4b760 100644 --- a/netlify/edge-functions/now-playing.js +++ b/netlify/edge-functions/now-playing.js @@ -30,9 +30,10 @@ const aliasArtist = (artist) => { } const sanitizeTrack = (track) => { - if (track.includes(' [')) return track.split(' [')[0] - if (track.includes(' (')) return track.split(' (')[0] - return track + let sanitizedTrack = track + if (track.includes(' [')) sanitizedTrack = track.split(' [')[0] + if (track.includes(' (')) sanitizedTrack = track.split(' (')[0] + return sanitizedTrack } export default async () => {