mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(editor): Set correct connection type when auto-adding nodes in new canvas (no-changelog) (#10966)
This commit is contained in:
@@ -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,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user