fix: Add optional chaining for 'isArtificalRecoveredEventItem' (no-changelog) (#5860)

* fix: add optional chaining for isArtificalRecoveredEventItem

* fix: fix isArtificalRecoveredEventItem typo
This commit is contained in:
Alex Grozav
2023-04-03 16:04:59 +03:00
committed by GitHub
parent ddbfcc7d93
commit df2ea0f5ec
5 changed files with 15 additions and 13 deletions

View File

@@ -544,7 +544,7 @@ export const getOutputSummary = (data: ITaskData[], nodeConnections: NodeInputCo
[targetInputIndex: string]: {
total: number;
iterations: number;
isArtificalRecoveredEventItem?: boolean;
isArtificialRecoveredEventItem?: boolean;
};
};
};
@@ -558,10 +558,10 @@ export const getOutputSummary = (data: ITaskData[], nodeConnections: NodeInputCo
run.data.main.forEach((output: INodeExecutionData[] | null, i: number) => {
const sourceOutputIndex = i;
// executionData that was recovered by recoverEvents in the CLI will have an isArtificalRecoveredEventItem property
// executionData that was recovered by recoverEvents in the CLI will have an isArtificialRecoveredEventItem property
// to indicate that it was not part of the original executionData
// we do not want to count these items in the summary
// if (output?.[0]?.json?.isArtificalRecoveredEventItem) {
// if (output?.[0]?.json?.isArtificialRecoveredEventItem) {
// return outputMap;
// }
@@ -600,10 +600,10 @@ export const getOutputSummary = (data: ITaskData[], nodeConnections: NodeInputCo
};
}
if (output?.[0]?.json?.isArtificalRecoveredEventItem) {
if (output?.[0]?.json?.isArtificialRecoveredEventItem) {
outputMap[sourceOutputIndex][targetNodeName][
targetInputIndex
].isArtificalRecoveredEventItem = true;
].isArtificialRecoveredEventItem = true;
outputMap[sourceOutputIndex][targetNodeName][targetInputIndex].total = 0;
} else {
outputMap[sourceOutputIndex][targetNodeName][targetInputIndex].total += output