mirror of
https://gitlab.com/RemixDev/deezer-js.git
synced 2025-01-14 18:45:19 +00:00
Fixed error for phantom tracks in get_my_favorite_tracks
This commit is contained in:
parent
c6c06e05d5
commit
8d40c79832
|
@ -462,9 +462,13 @@ class GW{
|
||||||
if (!ids.length) return []
|
if (!ids.length) return []
|
||||||
let data = await this.get_tracks(ids)
|
let data = await this.get_tracks(ids)
|
||||||
let result = []
|
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]}
|
track = {...track, ...ids_raw.data[i]}
|
||||||
result.push(map_user_track(track))
|
result.push(map_user_track(track))
|
||||||
|
i++
|
||||||
})
|
})
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue