diff --git a/lib/components/MusicScreen/MusicScreenTabView.dart b/lib/components/MusicScreen/MusicScreenTabView.dart index ee8a662a6..84832246f 100644 --- a/lib/components/MusicScreen/MusicScreenTabView.dart +++ b/lib/components/MusicScreen/MusicScreenTabView.dart @@ -54,9 +54,11 @@ class _MusicScreenTabViewState extends State ? 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, ); }