mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 05:57:20 -04:00
Merge pull request #4393 from crobibero/model-binder-readonly-list
Support IReadOnlyList in CommaDelimitedArrayModelBinder
This commit is contained in:
commit
2a5e53215c
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue