aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Eßlinger <github@esslinger.dev>2020-10-02 01:33:15 +0200
committerGitHub <noreply@github.com>2020-10-02 01:33:15 +0200
commit21b39a207dd4a6864e9d7bfe1c1e9253cbfc0f06 (patch)
tree04c6a87ee09fb29fc8ae5d4c99c6d53706adb743
parentd10090b394371e6b588a08b453a1dfb177e90ca1 (diff)
refactor: simplify null check
Co-authored-by: Cody Robibero <cody@robibe.ro>
-rw-r--r--Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs b/Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs
index 92bbd9663..208566dc8 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);