Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 5dae03a

Browse files
committed
Don't try map deep automap with scalar value types
1 parent 326255e commit 5dae03a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ServiceStack.Text/AutoMappingUtils.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,8 @@ public void Populate(object to, object from,
644644
fromValue = listResult;
645645
}
646646
}
647-
else if (!toMember.Type.IsNullableType())
647+
else if (!(toMember.Type.IsValueType()
648+
|| toMember.Type.IsNullableType()))
648649
{
649650
var toValue = toMember.Type.CreateInstance();
650651
toValue.PopulateWith(fromValue);

0 commit comments

Comments
 (0)