The Free Software Media System - Server Backend & API
Use null-coalescing assignment
Mark Monteiro4699ec6417ba
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.csindex 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.Dtoif (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)