mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
fix(core): Fix issue when a node does not return data
This commit is contained in:
parent
da437039a1
commit
5eea3cd6d0
|
@ -939,26 +939,28 @@ export class WorkflowExecute {
|
||||||
workflowId: workflow.id,
|
workflowId: workflow.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Check if the output data contains pairedItem data
|
if (nodeSuccessData) {
|
||||||
checkOutputData: for (const outputData of nodeSuccessData as INodeExecutionData[][]) {
|
// Check if the output data contains pairedItem data
|
||||||
if (outputData === null) {
|
checkOutputData: for (const outputData of nodeSuccessData) {
|
||||||
continue;
|
if (outputData === null) {
|
||||||
}
|
continue;
|
||||||
for (const item of outputData) {
|
}
|
||||||
if (!item.pairedItem) {
|
for (const item of outputData) {
|
||||||
// The pairedItem is missing so check if it can get automatically fixed
|
if (!item.pairedItem) {
|
||||||
if (
|
// The pairedItem is missing so check if it can get automatically fixed
|
||||||
executionData.data.main.length !== 1 ||
|
if (
|
||||||
executionData.data.main[0]?.length !== 1
|
executionData.data.main.length !== 1 ||
|
||||||
) {
|
executionData.data.main[0]?.length !== 1
|
||||||
// Automatically fixing is only possible if there is only one
|
) {
|
||||||
// input and one input item
|
// Automatically fixing is only possible if there is only one
|
||||||
break checkOutputData;
|
// input and one input item
|
||||||
}
|
break checkOutputData;
|
||||||
|
}
|
||||||
|
|
||||||
item.pairedItem = {
|
item.pairedItem = {
|
||||||
item: 0,
|
item: 0,
|
||||||
};
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue