From 6ca484f6a5fa17d029adea8abb11901dbe6590d3 Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Sat, 29 Jul 2023 11:57:35 +0200 Subject: [PATCH] Fix type conversion Fixes #4268 --- .../Elsa.Expressions/Models/ExpressionExecutionContext.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/Elsa.Expressions/Models/ExpressionExecutionContext.cs b/src/modules/Elsa.Expressions/Models/ExpressionExecutionContext.cs index e43e424ea..7d19e9adf 100644 --- a/src/modules/Elsa.Expressions/Models/ExpressionExecutionContext.cs +++ b/src/modules/Elsa.Expressions/Models/ExpressionExecutionContext.cs @@ -1,3 +1,4 @@ +using Elsa.Expressions.Helpers; using Microsoft.Extensions.DependencyInjection; namespace Elsa.Expressions.Models; @@ -102,7 +103,7 @@ public class ExpressionExecutionContext /// /// Returns the value of the memory block pointed to by the specified memory block reference. /// - public T? Get(MemoryBlockReference blockReference) => (T?)Get(blockReference); + public T? Get(MemoryBlockReference blockReference) => Get(blockReference).ConvertTo(); /// /// Sets the value of the memory block pointed to by the specified memory block reference.