Merge pull request #4393 from crobibero/model-binder-readonly-list

Support IReadOnlyList in CommaDelimitedArrayModelBinder
pull/4428/head
Bond-009 4 years ago committed by GitHub
commit 2a5e53215c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -15,7 +15,7 @@ namespace Jellyfin.Api.ModelBinders
public Task BindModelAsync(ModelBindingContext bindingContext)
{
var valueProviderResult = bindingContext.ValueProvider.GetValue(bindingContext.ModelName);
var elementType = bindingContext.ModelType.GetElementType();
var elementType = bindingContext.ModelType.GetElementType() ?? bindingContext.ModelType.GenericTypeArguments[0];
var converter = TypeDescriptor.GetConverter(elementType);
if (valueProviderResult.Length > 1)

Loading…
Cancel
Save