🐛 Fix potential crash on empty action in forged block

This commit is contained in:
Baptiste Arnaud 2025-02-18 16:14:41 +01:00
parent f45f565081
commit 84f20ff2ed
No known key found for this signature in database

View File

@ -26,7 +26,7 @@ export const executeForgedBlock = async (
): Promise<ExecuteIntegrationResponse> => {
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,