refactor: simplify null check

Co-authored-by: Cody Robibero <cody@robibe.ro>
pull/4252/head
Simon Eßlinger 4 years ago committed by GitHub
parent d10090b394
commit 21b39a207d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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);

Loading…
Cancel
Save