mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(core): Fix issue when a node does not return data
This commit is contained in:
@@ -939,26 +939,28 @@ export class WorkflowExecute {
|
||||
workflowId: workflow.id,
|
||||
});
|
||||
|
||||
// Check if the output data contains pairedItem data
|
||||
checkOutputData: for (const outputData of nodeSuccessData as INodeExecutionData[][]) {
|
||||
if (outputData === null) {
|
||||
continue;
|
||||
}
|
||||
for (const item of outputData) {
|
||||
if (!item.pairedItem) {
|
||||
// The pairedItem is missing so check if it can get automatically fixed
|
||||
if (
|
||||
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
|
||||
break checkOutputData;
|
||||
}
|
||||
if (nodeSuccessData) {
|
||||
// Check if the output data contains pairedItem data
|
||||
checkOutputData: for (const outputData of nodeSuccessData) {
|
||||
if (outputData === null) {
|
||||
continue;
|
||||
}
|
||||
for (const item of outputData) {
|
||||
if (!item.pairedItem) {
|
||||
// The pairedItem is missing so check if it can get automatically fixed
|
||||
if (
|
||||
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
|
||||
break checkOutputData;
|
||||
}
|
||||
|
||||
item.pairedItem = {
|
||||
item: 0,
|
||||
};
|
||||
item.pairedItem = {
|
||||
item: 0,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user