Feature variables v2.01 with bugfix (#164)
* Changed Variables.cs to full IDictionary with ConcurrentDictionary<string, object> backing * Bugfix for long running flows
This commit is contained in:
parent
d1f7ce47b7
commit
47e0795b66
|
|
@ -108,6 +108,12 @@ namespace Elsa.Models
|
|||
{
|
||||
object value;
|
||||
objects.TryGetValue(name, out value);
|
||||
|
||||
if(value != null && ((value.GetType() == typeof(JValue) || value.GetType() == typeof(JToken)) && value.GetType() != typeof(T)))
|
||||
{
|
||||
value = ((JToken)value).ToObject<T>();
|
||||
}
|
||||
|
||||
return value == null ? default : (T)value;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue