Skip to content

Commit

Permalink
Update PrimitiveExtension.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
alec1o committed May 31, 2024
1 parent c93ebac commit 0849c48
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/src/extension/PrimitiveExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ internal static (object Value, bool IsError) FromPrimitive(Type type, Primitive
{
value = primitive.Get.List(type);
}
else if (type.IsValueType && !type.IsEnum && !type.IsPrimitive)
{
value = primitive.Get.Struct(type);
}
else if (type.IsArray)
{
value = primitive.Get.Array(type);
Expand All @@ -218,10 +222,6 @@ internal static (object Value, bool IsError) FromPrimitive(Type type, Primitive
{
value = primitive.Get.Class(type);
}
else if (type.IsValueType && !type.IsEnum && !type.IsPrimitive)
{
value = primitive.Get.Struct(type);
}

if (primitive.IsValid)
return (value, value == null);
Expand Down

0 comments on commit 0849c48

Please sign in to comment.