Update ObjectConverter to not throw when value is null

This commit is contained in:
Sipke Schoorstra 2021-10-01 19:11:34 +02:00
parent d9b1968562
commit e0f57a7ac0

View file

@ -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) => (T?) value?.ConvertTo(typeof(T));
public static object? ConvertTo(this object? value, Type targetType)
{