Skip to content

Commit

Permalink
fix: album simple _extractTracksFromPage always expects Paging Map
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Apr 28, 2024
1 parent 57d52a9 commit c4b37c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/models/album.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ class AlbumSimple extends Object {
return [];
}

if (json is List) {
return json.map((trackJson) => TrackSimple.fromJson(trackJson));
}

var items = Paging.fromJson(json).itemsNative;
return json.isEmpty || (items == null)
? []
Expand Down

0 comments on commit c4b37c5

Please sign in to comment.