mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 05:57:20 -04:00
feat(CommaDelimitedArrayModelBinder): add none result check
This commit is contained in:
parent
c3e7eb3a6f
commit
33f80dc3c1
1 changed files with 5 additions and 0 deletions
|
@ -18,6 +18,11 @@ namespace Jellyfin.Api.ModelBinders
|
|||
var elementType = bindingContext.ModelType.GetElementType();
|
||||
var converter = TypeDescriptor.GetConverter(elementType);
|
||||
|
||||
if (valueProviderResult == ValueProviderResult.None)
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
if (valueProviderResult.Length > 1)
|
||||
{
|
||||
var result = Array.CreateInstance(elementType, valueProviderResult.Length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue