mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(core, editor): prevent overlapping runData
and pinData
(#4323)
🐛 Prevent overlapping `runData` and `pinData`
This commit is contained in:
parent
2d4202d051
commit
cd74c3ebae
|
@ -188,12 +188,19 @@ export class WorkflowExecute {
|
||||||
for (let inputIndex = 0; inputIndex < connections.length; inputIndex++) {
|
for (let inputIndex = 0; inputIndex < connections.length; inputIndex++) {
|
||||||
connection = connections[inputIndex];
|
connection = connections[inputIndex];
|
||||||
|
|
||||||
if (workflow.getNode(connection.node)?.disabled) continue;
|
const node = workflow.getNode(connection.node);
|
||||||
|
|
||||||
|
if (node?.disabled) continue;
|
||||||
|
|
||||||
|
if (node && pinData && pinData[node.name]) {
|
||||||
|
incomingData.push(pinData[node.name]);
|
||||||
|
} else {
|
||||||
|
incomingData.push(
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
|
runData[connection.node][runIndex].data![connection.type][connection.index]!,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
incomingData.push(
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
||||||
runData[connection.node][runIndex].data![connection.type][connection.index]!,
|
|
||||||
);
|
|
||||||
incomingSourceData.main.push({
|
incomingSourceData.main.push({
|
||||||
previousNode: connection.node,
|
previousNode: connection.node,
|
||||||
});
|
});
|
||||||
|
|
|
@ -959,6 +959,10 @@ export default mixins(
|
||||||
return option + this.$locale.baseText('ndv.output.of') + (this.maxRunIndex+1) + itemsLabel;
|
return option + this.$locale.baseText('ndv.output.of') + (this.maxRunIndex+1) + itemsLabel;
|
||||||
},
|
},
|
||||||
getDataCount(runIndex: number, outputIndex: number) {
|
getDataCount(runIndex: number, outputIndex: number) {
|
||||||
|
if (this.pinData) {
|
||||||
|
return this.pinData.length;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.node === null) {
|
if (this.node === null) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2234,6 +2234,10 @@ export default mixins(
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onNodeRun({ name, data, waiting }: { name: string, data: ITaskData[] | null, waiting: boolean }) {
|
onNodeRun({ name, data, waiting }: { name: string, data: ITaskData[] | null, waiting: boolean }) {
|
||||||
|
const pinData = this.$store.getters.pinData;
|
||||||
|
|
||||||
|
if (pinData && pinData[name]) return;
|
||||||
|
|
||||||
const sourceNodeName = name;
|
const sourceNodeName = name;
|
||||||
const sourceNode = this.$store.getters.getNodeByName(sourceNodeName);
|
const sourceNode = this.$store.getters.getNodeByName(sourceNodeName);
|
||||||
const sourceId = sourceNode.id;
|
const sourceId = sourceNode.id;
|
||||||
|
|
Loading…
Reference in a new issue