mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-23 09:14:45 +03:00
Convert type checks and null checks into pattern matching
This commit is contained in:
@@ -82,8 +82,7 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
{
|
||||
var parent = GetParentItem(request);
|
||||
|
||||
var collectionFolder = parent as IHasCollectionType;
|
||||
if (collectionFolder != null)
|
||||
if (parent is IHasCollectionType collectionFolder)
|
||||
{
|
||||
return collectionFolder.CollectionType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user