Skip to content

Commit c50d04a

Browse files
committed
fix(core): Fix crash on webhook when last node did not return data
1 parent 6bbb4df commit c50d04a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/cli/src/WebhookHelpers.ts

+3
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ export async function executeWebhook(
551551
if (returnData.data!.main[0]![0] === undefined) {
552552
responseCallback(new Error('No item to return got found.'), {});
553553
didSendResponse = true;
554+
return undefined;
554555
}
555556

556557
data = returnData.data!.main[0]![0].json;
@@ -602,11 +603,13 @@ export async function executeWebhook(
602603
if (data === undefined) {
603604
responseCallback(new Error('No item to return got found.'), {});
604605
didSendResponse = true;
606+
return undefined;
605607
}
606608

607609
if (data.binary === undefined) {
608610
responseCallback(new Error('No binary data to return got found.'), {});
609611
didSendResponse = true;
612+
return undefined;
610613
}
611614

612615
const responseBinaryPropertyName = workflow.expression.getSimpleParameterValue(

0 commit comments

Comments
 (0)