Fix type cast issue when evaluating JS expressions with no specialized type
This commit is contained in:
parent
ac32034d00
commit
63aef00415
|
|
@ -53,6 +53,9 @@ namespace Elsa.Scripting.JavaScript.Services
|
|||
var json = JsonConvert.SerializeObject(returnValue);
|
||||
return JsonConvert.DeserializeObject(json, returnType);
|
||||
}
|
||||
|
||||
if (returnType == typeof(object))
|
||||
return returnValue;
|
||||
|
||||
return Convert.ChangeType(returnValue, returnType);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue