mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
fix(editor): Set correct connection type when auto-adding nodes in new canvas (no-changelog) (#10966)
This commit is contained in:
parent
62159bd71c
commit
9bd247f06b
|
@ -859,6 +859,7 @@ async function onAddNodesAndConnections(
|
|||
const mappedConnections: CanvasConnectionCreateData[] = connections.map(({ from, to }) => {
|
||||
const fromNode = editableWorkflow.value.nodes[offsetIndex + from.nodeIndex];
|
||||
const toNode = editableWorkflow.value.nodes[offsetIndex + to.nodeIndex];
|
||||
const type = from.type ?? to.type ?? NodeConnectionType.Main;
|
||||
|
||||
return {
|
||||
source: fromNode.id,
|
||||
|
@ -866,11 +867,11 @@ async function onAddNodesAndConnections(
|
|||
data: {
|
||||
source: {
|
||||
index: from.outputIndex ?? 0,
|
||||
type: NodeConnectionType.Main,
|
||||
type,
|
||||
},
|
||||
target: {
|
||||
index: to.inputIndex ?? 0,
|
||||
type: NodeConnectionType.Main,
|
||||
type,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue