aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-11-09 14:57:02 -0700
committercrobibero <cody@robibe.ro>2020-11-09 14:57:02 -0700
commit6748ba287d8cd9054072ce1ffc51c7aa8690e108 (patch)
tree5b859fa356ef2f6abd5fb281ff5655ccf5fd3ebf /Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs
parentf8e6edbfeb8c437c2ed0a9c9b44bed0fc105b2c2 (diff)
parent296e534f670df9069e8cb50683a964ea2a5cdc37 (diff)
Merge remote-tracking branch 'upstream/master' into query-fields
Diffstat (limited to 'Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs')
-rw-r--r--Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs2
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)