fix(core): Fix pairedItem for alwaysOutputData & multi identical resolve (#6405)

This commit is contained in:
Jan Oberhauser
2023-06-21 09:38:28 +02:00
committed by GitHub
parent c3ba0123ad
commit 4b0e0b7970
12 changed files with 2999 additions and 2250 deletions

View File

@@ -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 {

View File

@@ -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',