Pārlūkot izejas kodu

refactor: simplify null check

Co-authored-by: Cody Robibero <cody@robibe.ro>
Simon Eßlinger 4 gadi atpakaļ
vecāks
revīzija
21b39a207d

+ 1 - 1
Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs

@@ -39,7 +39,7 @@ namespace Jellyfin.Api.ModelBinders
                 {
                 {
                     var values = Array.ConvertAll(
                     var values = Array.ConvertAll(
                         value.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries),
                         value.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries),
-                        x => { return converter.ConvertFromString(x != null ? x.Trim() : x); });
+                        x => converter.ConvertFromString(x?.Trim()));
 
 
                     var typedValues = Array.CreateInstance(elementType, values.Length);
                     var typedValues = Array.CreateInstance(elementType, values.Length);
                     values.CopyTo(typedValues, 0);
                     values.CopyTo(typedValues, 0);