!2365 fix(#I4SICI): throw exception when Value type is string and not set Items parameter

* chore: bump version to beta09
* fix: 修复CheckboxList 组件 Value 为 string 时报错问题
This commit is contained in:
Argo 2022-01-28 23:38:52 +00:00
parent d25b31ec6d
commit 71ad4212fc
2 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<Version>6.2.9-beta08</Version>
<Version>6.2.9-beta09</Version>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">

View File

@ -112,7 +112,8 @@ public partial class CheckboxList<TValue>
Type? innerType = null;
if (typeof(IEnumerable).IsAssignableFrom(typeof(TValue)))
{
innerType = typeof(TValue).GetGenericArguments()[0];
var t = typeof(TValue);
innerType = t.IsGenericType ? typeof(TValue).GetGenericArguments()[0] : t;
}
if (innerType != null && innerType.IsEnum)
{