diff --git a/netlify/edge-functions/now-playing.js b/netlify/edge-functions/now-playing.js index 310e7919..a4f17944 100644 --- a/netlify/edge-functions/now-playing.js +++ b/netlify/edge-functions/now-playing.js @@ -72,7 +72,7 @@ export default async () => { }) .then((data) => data.json()) .catch() - const track = trackRes.data[0]['attributes'] + const track = trackRes.data?.[0]['attributes'] return Response.json({ artist: aliasArtist(track['artistName']),