mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 22:38:30 +01:00
Replace == null with is null
This commit is contained in:
@@ -121,7 +121,7 @@ namespace Emby.Server.Implementations.Collections
|
||||
{
|
||||
var folder = GetCollectionsFolder(false).GetAwaiter().GetResult();
|
||||
|
||||
return folder == null
|
||||
return folder is null
|
||||
? Enumerable.Empty<BoxSet>()
|
||||
: folder.GetChildren(user, true).OfType<BoxSet>();
|
||||
}
|
||||
@@ -138,7 +138,7 @@ namespace Emby.Server.Implementations.Collections
|
||||
|
||||
var parentFolder = await GetCollectionsFolder(true).ConfigureAwait(false);
|
||||
|
||||
if (parentFolder == null)
|
||||
if (parentFolder is null)
|
||||
{
|
||||
throw new ArgumentException(nameof(parentFolder));
|
||||
}
|
||||
@@ -216,7 +216,7 @@ namespace Emby.Server.Implementations.Collections
|
||||
{
|
||||
var item = _libraryManager.GetItemById(id);
|
||||
|
||||
if (item == null)
|
||||
if (item is null)
|
||||
{
|
||||
throw new ArgumentException("No item exists with the supplied Id");
|
||||
}
|
||||
@@ -267,7 +267,7 @@ namespace Emby.Server.Implementations.Collections
|
||||
|
||||
var child = collection.LinkedChildren.FirstOrDefault(i => (i.ItemId.HasValue && i.ItemId.Value.Equals(guidId)) || (childItem != null && string.Equals(childItem.Path, i.Path, StringComparison.OrdinalIgnoreCase)));
|
||||
|
||||
if (child == null)
|
||||
if (child is null)
|
||||
{
|
||||
_logger.LogWarning("No collection title exists with the supplied Id");
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user