diff options
| author | Bond-009 <bond.009@outlook.com> | 2020-11-06 16:29:06 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-06 16:29:06 +0100 |
| commit | 2a5e53215ceda32633c3e9a25801ac3cf1a76a1d (patch) | |
| tree | a51d80445efd8516e6fba96c3591596ba784bb89 | |
| parent | 082705c0d8f4bf8eca3f9b2349d603813175a53c (diff) | |
| parent | ef43878bbc204a169adb0ad0639cc143cfd2db11 (diff) | |
Merge pull request #4393 from crobibero/model-binder-readonly-list
Support IReadOnlyList in CommaDelimitedArrayModelBinder
| -rw-r--r-- | Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs b/Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs index 208566dc8..4f012cab2 100644 --- a/Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs +++ b/Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs @@ -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) |
