Skip to content

Commit

Permalink
fix(editor): Set correct connection type when auto-adding nodes in ne…
Browse files Browse the repository at this point in the history
…w canvas (no-changelog) (#10966)
  • Loading branch information
alexgrozav authored Sep 25, 2024
1 parent 62159bd commit 9bd247f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/editor-ui/src/views/NodeView.v2.vue
Original file line number Diff line number Diff line change
Expand Up @@ -859,18 +859,19 @@ 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,
target: toNode.id,
data: {
source: {
index: from.outputIndex ?? 0,
type: NodeConnectionType.Main,
type,
},
target: {
index: to.inputIndex ?? 0,
type: NodeConnectionType.Main,
type,
},
},
};
Expand Down

0 comments on commit 9bd247f

Please sign in to comment.