From 21b39a207dd4a6864e9d7bfe1c1e9253cbfc0f06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20E=C3=9Flinger?= Date: Fri, 2 Oct 2020 01:33:15 +0200 Subject: [PATCH] refactor: simplify null check Co-authored-by: Cody Robibero --- Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs b/Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs index 92bbd96633..208566dc8e 100644 --- a/Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs +++ b/Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs @@ -39,7 +39,7 @@ namespace Jellyfin.Api.ModelBinders { var values = Array.ConvertAll( 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); values.CopyTo(typedValues, 0);