Add type parsing support with object target type
This commit is contained in:
parent
890789c9cd
commit
2a22a328c4
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue