mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -08:00
⚡ Fix issue with nodes that have only node connected to second input
This commit is contained in:
parent
61937c52ba
commit
972561416c
|
@ -1851,21 +1851,19 @@ export default mixins(
|
||||||
for (type of Object.keys(currentConnections[sourceNode])) {
|
for (type of Object.keys(currentConnections[sourceNode])) {
|
||||||
connection[type] = [];
|
connection[type] = [];
|
||||||
for (sourceIndex = 0; sourceIndex < currentConnections[sourceNode][type].length; sourceIndex++) {
|
for (sourceIndex = 0; sourceIndex < currentConnections[sourceNode][type].length; sourceIndex++) {
|
||||||
if (!currentConnections[sourceNode][type][sourceIndex]) {
|
|
||||||
// There is so something wrong with the data so ignore
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
const nodeSourceConnections = [];
|
const nodeSourceConnections = [];
|
||||||
for (connectionIndex = 0; connectionIndex < currentConnections[sourceNode][type][sourceIndex].length; connectionIndex++) {
|
if (currentConnections[sourceNode][type][sourceIndex]) {
|
||||||
const nodeConnection: NodeInputConnections = [];
|
for (connectionIndex = 0; connectionIndex < currentConnections[sourceNode][type][sourceIndex].length; connectionIndex++) {
|
||||||
connectionData = currentConnections[sourceNode][type][sourceIndex][connectionIndex];
|
const nodeConnection: NodeInputConnections = [];
|
||||||
if (!createNodeNames.includes(connectionData.node)) {
|
connectionData = currentConnections[sourceNode][type][sourceIndex][connectionIndex];
|
||||||
// Node does not get created so skip input connection
|
if (!createNodeNames.includes(connectionData.node)) {
|
||||||
continue;
|
// Node does not get created so skip input connection
|
||||||
}
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
nodeSourceConnections.push(connectionData);
|
nodeSourceConnections.push(connectionData);
|
||||||
// Add connection
|
// Add connection
|
||||||
|
}
|
||||||
}
|
}
|
||||||
connection[type].push(nodeSourceConnections);
|
connection[type].push(nodeSourceConnections);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue