Retry: Update ObjectConverter to not throw when value is null
This commit is contained in:
parent
e0f57a7ac0
commit
2a01f6c5a7
|
|
@ -9,7 +9,7 @@ namespace Elsa
|
|||
{
|
||||
public static class ObjectConverter
|
||||
{
|
||||
public static T? ConvertTo<T>(this object? value) => (T?) value?.ConvertTo(typeof(T));
|
||||
public static T? ConvertTo<T>(this object? value) => value != null ? (T?)value.ConvertTo(typeof(T)) : default;
|
||||
|
||||
public static object? ConvertTo(this object? value, Type targetType)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue