mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
fix(core): Fix crash on webhook when last node did not return data
This commit is contained in:
parent
6bbb4df059
commit
c50d04af9e
|
@ -551,6 +551,7 @@ export async function executeWebhook(
|
|||
if (returnData.data!.main[0]![0] === undefined) {
|
||||
responseCallback(new Error('No item to return got found.'), {});
|
||||
didSendResponse = true;
|
||||
return undefined;
|
||||
}
|
||||
|
||||
data = returnData.data!.main[0]![0].json;
|
||||
|
@ -602,11 +603,13 @@ export async function executeWebhook(
|
|||
if (data === undefined) {
|
||||
responseCallback(new Error('No item to return got found.'), {});
|
||||
didSendResponse = true;
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (data.binary === undefined) {
|
||||
responseCallback(new Error('No binary data to return got found.'), {});
|
||||
didSendResponse = true;
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const responseBinaryPropertyName = workflow.expression.getSimpleParameterValue(
|
||||
|
|
Loading…
Reference in a new issue