From 8d40c798329c3e8ef77902914e4cbac3c677cd8a Mon Sep 17 00:00:00 2001 From: RemixDev Date: Fri, 10 Jun 2022 17:12:44 +0200 Subject: [PATCH] Fixed error for phantom tracks in get_my_favorite_tracks --- deezer/gw.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deezer/gw.js b/deezer/gw.js index 1b1b451..1634559 100644 --- a/deezer/gw.js +++ b/deezer/gw.js @@ -462,9 +462,13 @@ class GW{ if (!ids.length) return [] let data = await this.get_tracks(ids) let result = [] - data.forEach((track, i) => { + let i = 0 + data.forEach((track) => { + if (!track) return + while (track.SNG_ID != ids[i]) i++ track = {...track, ...ids_raw.data[i]} result.push(map_user_track(track)) + i++ }) return result }