Skip to content

Commit

Permalink
Tracks count for Spotify playlists (simple object)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaedb committed Mar 25, 2024
1 parent 1c00312 commit a106aa6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/util/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ const formatPlaylist = function (data) {
}

if (playlist.tracks_total === undefined) {
playlist.tracks_total = playlist.tracks ? playlist.tracks.length : 0;
playlist.tracks_total = playlist.tracks?.length || data?.tracks?.total || 0;
}

if (data.last_modified_date && playlist.last_modified === undefined) {
Expand Down

0 comments on commit a106aa6

Please sign in to comment.