From 84f20ff2ed948f658fa4ba4d95ea34fee42d8261 Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Tue, 18 Feb 2025 16:14:41 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20potential=20crash=20on=20e?= =?UTF-8?q?mpty=20action=20in=20forged=20block?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/bot-engine/src/forge/executeForgedBlock.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bot-engine/src/forge/executeForgedBlock.ts b/packages/bot-engine/src/forge/executeForgedBlock.ts index 52bcaf1e8..00b4988b5 100644 --- a/packages/bot-engine/src/forge/executeForgedBlock.ts +++ b/packages/bot-engine/src/forge/executeForgedBlock.ts @@ -26,7 +26,7 @@ export const executeForgedBlock = async ( ): Promise => { const blockDef = forgedBlocks[block.type]; if (!blockDef) return { outgoingEdgeId: block.outgoingEdgeId }; - const action = blockDef.actions.find((a) => a.name === block.options.action); + const action = blockDef.actions.find((a) => a.name === block.options?.action); if (!block.options || !action) return { outgoingEdgeId: block.outgoingEdgeId,