The Free Software Media System - Server Backend & API
feat(CommaDelimitedArrayModelBinder): add none result check
[email protected]33f80dc3c167
diff --git a/Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs b/Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.csindex 208566dc8e..13469194a0 100644--- a/Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs+++ b/Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs@@ -18,6 +18,11 @@ namespace Jellyfin.Api.ModelBindersvar 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);