Skip to content

Commit

Permalink
Check if parentItem is null when getting sortBy
Browse files Browse the repository at this point in the history
  • Loading branch information
jmshrv committed May 1, 2021
1 parent e0e187d commit 3109771
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/components/MusicScreen/MusicScreenTabView.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ class _MusicScreenTabViewState extends State<MusicScreenTabView>
? jellyfinApiData.currentUser.view
: widget.parentItem,
includeItemTypes: _includeItemTypes(widget.tabContentType),
sortBy: widget.parentItem.type == "MusicArtist"
? "ProductionYear"
: "SortName",
sortBy: widget.parentItem == null
? "SortName"
: widget.parentItem.type == "MusicArtist"
? "ProductionYear"
: "SortName",
searchTerm: widget.searchTerm,
);
}
Expand Down

0 comments on commit 3109771

Please sign in to comment.