From 2042a9580575b04620ed8d6afbc3fc915d9b3a6c Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 19 Feb 2024 20:12:46 +0100 Subject: [PATCH] Fix runs --- packages/server/src/api/controllers/script.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/api/controllers/script.ts b/packages/server/src/api/controllers/script.ts index 9a404da9fb..bdca2d6e18 100644 --- a/packages/server/src/api/controllers/script.ts +++ b/packages/server/src/api/controllers/script.ts @@ -3,7 +3,7 @@ import { IsolatedVM } from "../../jsRunner/vm" export async function execute(ctx: Ctx) { const { script, context } = ctx.request.body - const runner = new IsolatedVM(context) + const runner = new IsolatedVM().withContext(context) const result = runner.execute(`(function(){\n${script}\n})();`) ctx.body = result