mirror of
https://github.com/baptisteArno/typebot.io.git
synced 2026-06-19 21:04:33 +08:00
🐛 Fix potential crash on empty action in forged block
This commit is contained in:
parent
f45f565081
commit
84f20ff2ed
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user