From 4699ec6417ba31f5f6ac9058ef108c779aabd0e1 Mon Sep 17 00:00:00 2001 From: Mark Monteiro Date: Wed, 1 Apr 2020 21:20:36 +0200 Subject: [PATCH] Use null-coalescing assignment Co-Authored-By: Bond-009 --- Emby.Server.Implementations/Dto/DtoService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs index 67ecdb4ea7..34a342cf7e 100644 --- a/Emby.Server.Implementations/Dto/DtoService.cs +++ b/Emby.Server.Implementations/Dto/DtoService.cs @@ -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)