mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
fix(core): Fix pairedItem for alwaysOutputData & multi identical resolve (#6405)
This commit is contained in:
@@ -1763,6 +1763,23 @@ export interface IWorkflowSettings {
|
||||
executionTimeout?: number;
|
||||
}
|
||||
|
||||
export interface WorkflowTestData {
|
||||
description: string;
|
||||
input: {
|
||||
workflowData: {
|
||||
nodes: INode[];
|
||||
connections: IConnections;
|
||||
settings?: IWorkflowSettings;
|
||||
};
|
||||
};
|
||||
output: {
|
||||
nodeExecutionOrder?: string[];
|
||||
nodeData: {
|
||||
[key: string]: any[][];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export type LogTypes = 'debug' | 'verbose' | 'info' | 'warn' | 'error';
|
||||
|
||||
export interface ILogger {
|
||||
|
||||
@@ -806,6 +806,13 @@ export class WorkflowDataProxy {
|
||||
.filter((result) => result !== null);
|
||||
|
||||
if (results.length !== 1) {
|
||||
// Check if the results are all the same
|
||||
const firstResult = results[0];
|
||||
if (results.every((result) => result === firstResult)) {
|
||||
// All results are the same so return the first one
|
||||
return firstResult;
|
||||
}
|
||||
|
||||
throw createExpressionError('Invalid expression', {
|
||||
messageTemplate: 'Invalid expression under ‘%%PARAMETER%%’',
|
||||
functionality: 'pairedItem',
|
||||
|
||||
Reference in New Issue
Block a user