diff --git a/allstarr/wwwroot/index.html b/allstarr/wwwroot/index.html index 70c6f14..94b4a00 100644 --- a/allstarr/wwwroot/index.html +++ b/allstarr/wwwroot/index.html @@ -1585,9 +1585,9 @@ // Add manual map button for external tracks // Use JSON.stringify to properly escape strings for JavaScript const escapedName = JSON.stringify(name); - const escapedTitle = JSON.stringify(t.title); - const escapedArtist = JSON.stringify(t.artists[0] || ''); - const escapedSpotifyId = JSON.stringify(t.spotifyId); + const escapedTitle = JSON.stringify(t.title || ''); + const escapedArtist = JSON.stringify((t.artists && t.artists[0]) || ''); + const escapedSpotifyId = JSON.stringify(t.spotifyId || ''); mapButton = ``; }