Add type parsing support with object target type

This commit is contained in:
Sipke Schoorstra 2021-03-25 22:15:40 +01:00
parent 890789c9cd
commit 2a22a328c4

View file

@ -9,7 +9,7 @@ namespace Elsa
public static object Parse(this string value, Type targetType)
{
if (typeof(string) == targetType || targetType == default)
if (typeof(string) == targetType || typeof(object) == targetType || targetType == default)
return value;
var converter = TypeDescriptor.GetConverter(targetType);