From b6cfdb8b92650aa4f5c33b9523700ffeaa7694d0 Mon Sep 17 00:00:00 2001 From: Stepan Goremykin Date: Thu, 6 Apr 2023 19:30:17 +0200 Subject: Simplify conditional expression --- Emby.Server.Implementations/Dto/DtoService.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Emby.Server.Implementations/Dto') diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs index c725839fba..8fa2f05662 100644 --- a/Emby.Server.Implementations/Dto/DtoService.cs +++ b/Emby.Server.Implementations/Dto/DtoService.cs @@ -571,9 +571,7 @@ namespace Emby.Server.Implementations.Dto return null; } }).Where(i => i is not null) - .Where(i => user is null ? - true : - i.IsVisible(user)) + .Where(i => user is null || i.IsVisible(user)) .DistinctBy(x => x.Name, StringComparer.OrdinalIgnoreCase) .ToDictionary(i => i.Name, StringComparer.OrdinalIgnoreCase); -- cgit v1.2.3