mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
refactor: simplify null check
Co-authored-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
parent
d10090b394
commit
21b39a207d
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user