Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
Fix an edge deletion bug for nodes with dynamic inputs (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariakleiner authored Oct 17, 2022
1 parent 8990c97 commit 5c4cf4d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/Library/NodeGraph/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,14 @@ updateStoreConn(pipeline, {fromKey, fromStore, toKey, toStore}, isSelected) {
if (isSelected) {
node.connections[toStore].push({from: fromKey, storeName: fromStore});
} else {
delete node.connections[toStore];
if (node.connections[toStore].length <= 1) {
delete node.connections[toStore];
} else {
const index = node.connections[toStore].findIndex(conn => conn.from === fromKey);
if (index >= 0) {
node.connections[toStore].splice(index, 1);
}
}
}
pipeline.nodes[node.id] = node;
return pipeline;
Expand Down

0 comments on commit 5c4cf4d

Please sign in to comment.