mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +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 mappedConnections: CanvasConnectionCreateData[] = connections.map(({ from, to }) => {
|
||||||
const fromNode = editableWorkflow.value.nodes[offsetIndex + from.nodeIndex];
|
const fromNode = editableWorkflow.value.nodes[offsetIndex + from.nodeIndex];
|
||||||
const toNode = editableWorkflow.value.nodes[offsetIndex + to.nodeIndex];
|
const toNode = editableWorkflow.value.nodes[offsetIndex + to.nodeIndex];
|
||||||
|
const type = from.type ?? to.type ?? NodeConnectionType.Main;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
source: fromNode.id,
|
source: fromNode.id,
|
||||||
@@ -866,11 +867,11 @@ async function onAddNodesAndConnections(
|
|||||||
data: {
|
data: {
|
||||||
source: {
|
source: {
|
||||||
index: from.outputIndex ?? 0,
|
index: from.outputIndex ?? 0,
|
||||||
type: NodeConnectionType.Main,
|
type,
|
||||||
},
|
},
|
||||||
target: {
|
target: {
|
||||||
index: to.inputIndex ?? 0,
|
index: to.inputIndex ?? 0,
|
||||||
type: NodeConnectionType.Main,
|
type,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user