Use null-coalescing assignment

Co-Authored-By: Bond-009 <bond.009@outlook.com>
This commit is contained in:
Mark Monteiro 2020-04-01 21:20:36 +02:00 committed by GitHub
parent 1a4d9d4c53
commit 4699ec6417
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1062,7 +1062,7 @@ namespace Emby.Server.Implementations.Dto
if (options.ContainsField(ItemFields.LocalTrailerCount))
{
allExtras = allExtras ?? item.GetExtras().ToArray();
allExtras ??= item.GetExtras().ToArray();
dto.LocalTrailerCount = allExtras.Count(i => i.ExtraType == ExtraType.Trailer);
if (item is IHasTrailers hasTrailers)