From df8f059504266667ffd30b5d706bad9dd7e09ab3 Mon Sep 17 00:00:00 2001 From: Shireen Missi <94372015+ShireenMissi@users.noreply.github.com> Date: Mon, 10 Feb 2025 14:01:26 +0000 Subject: [PATCH] fix(core): Same version of merge node behaves differently after n8n update (#13106) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ --- packages/core/src/execution-engine/workflow-execute.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/src/execution-engine/workflow-execute.ts b/packages/core/src/execution-engine/workflow-execute.ts index 00a7a580a3..8c38f2207d 100644 --- a/packages/core/src/execution-engine/workflow-execute.ts +++ b/packages/core/src/execution-engine/workflow-execute.ts @@ -1489,7 +1489,7 @@ export class WorkflowExecute { nodeSuccessData = runNodeData.data; - const didContinueOnFail = nodeSuccessData?.at(0)?.at(0)?.json?.error !== undefined; + const didContinueOnFail = nodeSuccessData?.[0]?.[0]?.json.error !== undefined; while (didContinueOnFail && tryIndex !== maxTries - 1) { await sleep(waitBetweenTries); @@ -1531,7 +1531,7 @@ export class WorkflowExecute { nodeSuccessData = this.assignPairedItems(nodeSuccessData, executionData); - if (nodeSuccessData === null || nodeSuccessData[0][0] === undefined) { + if (!nodeSuccessData?.[0]?.[0]) { if (executionData.node.alwaysOutputData === true) { const pairedItem: IPairedItemData[] = []; @@ -1548,7 +1548,7 @@ export class WorkflowExecute { }); }); - nodeSuccessData = nodeSuccessData || []; + nodeSuccessData ??= []; nodeSuccessData[0] = [ { json: {},