diff --git a/api/scrobble.js b/api/scrobble.js index ef3cdf92..0d43855e 100644 --- a/api/scrobble.js +++ b/api/scrobble.js @@ -57,9 +57,9 @@ export default async (request, context) => { console.log(err); return {} }); - const track = trackRes["recenttracks"]["track"][0]; + const trackData = trackRes["recenttracks"]["track"][0]; let mbid = trackRes['track']['artist']['mbid'] - const mbidMap = () => mbidRes[track["artist"]["#text"].toLowerCase()] || ""; + const mbidMap = () => mbidRes[trackData['artist']['#text'].toLowerCase()] || ""; // mbid mismatches if (mbidMap() !== "") mbid = mbidMap();