mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixing RuntimeBinderException ("Cannot implicitly convert type 'Foo' to 'Newtonsoft.Json.Linq.JToken'") when getting a complex type from the workflow state.
This commit is contained in:
@@ -40,7 +40,8 @@ namespace Orchard.Workflows.Models {
|
||||
return default(T);
|
||||
}
|
||||
|
||||
return (T)State[key];
|
||||
var value = State[key];
|
||||
return value != null ? value.ToObject<T>() : default(T);
|
||||
}
|
||||
|
||||
public object GetState(string key) {
|
||||
|
Reference in New Issue
Block a user