diff --git a/src/apps/Elsa.Server.Web/Program.cs b/src/apps/Elsa.Server.Web/Program.cs index ae7a2ffa9..8038fa15b 100644 --- a/src/apps/Elsa.Server.Web/Program.cs +++ b/src/apps/Elsa.Server.Web/Program.cs @@ -52,7 +52,6 @@ using Proto.Remote.GrpcNet; using StackExchange.Redis; // ReSharper disable RedundantAssignment - const PersistenceProvider persistenceProvider = PersistenceProvider.EntityFrameworkCore; const SqlDatabaseProvider sqlDatabaseProvider = SqlDatabaseProvider.Sqlite; const bool useHangfire = false; diff --git a/src/modules/Elsa.JavaScript/Services/JintJavaScriptEvaluator.cs b/src/modules/Elsa.JavaScript/Services/JintJavaScriptEvaluator.cs index 21f8147b4..c5ea7ad9a 100644 --- a/src/modules/Elsa.JavaScript/Services/JintJavaScriptEvaluator.cs +++ b/src/modules/Elsa.JavaScript/Services/JintJavaScriptEvaluator.cs @@ -48,7 +48,10 @@ public class JintJavaScriptEvaluator(IConfiguration configuration, INotification { options ??= new ExpressionEvaluatorOptions(); - var engineOptions = new Jint.Options(); + var engineOptions = new Jint.Options + { + ExperimentalFeatures = ExperimentalFeature.TaskInterop + }; if (_jintOptions.AllowClrAccess) engineOptions.AllowClr(); @@ -111,7 +114,7 @@ public class JintJavaScriptEvaluator(IConfiguration configuration, INotification { var preparedScript = GetOrCreatePrepareScript(expression); var result = engine.Evaluate(preparedScript); - return result.ToObject(); + return result.UnwrapIfPromise().ToObject(); } private Prepared