diff options
| author | Stepan Goremykin <goremukin@gmail.com> | 2023-04-06 19:30:17 +0200 |
|---|---|---|
| committer | Stepan Goremykin <goremukin@gmail.com> | 2023-04-06 19:30:17 +0200 |
| commit | b6cfdb8b92650aa4f5c33b9523700ffeaa7694d0 (patch) | |
| tree | a79bc1836dde01a4f6dc15c88937b3cc35d3d8fc /Emby.Server.Implementations/Dto | |
| parent | 19e65269a24714469bb6a2b3e15602b73327e5d3 (diff) | |
Simplify conditional expression
Diffstat (limited to 'Emby.Server.Implementations/Dto')
| -rw-r--r-- | Emby.Server.Implementations/Dto/DtoService.cs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs index c725839fb..8fa2f0566 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); |
