refactor(react/handle-connection-state): cleanup
This commit is contained in:
@@ -330,6 +330,7 @@ const createRFStore = ({
|
||||
|
||||
set(currentConnection);
|
||||
},
|
||||
|
||||
reset: () => {
|
||||
// @todo: what should we do about this? Do we still need it?
|
||||
// if you are on a SPA with multiple flows, we want to make sure that the store gets resetted
|
||||
|
||||
@@ -47,9 +47,7 @@ export function updateNodesAndEdgesSelections({ changedNodes, changedEdges, get,
|
||||
export function updateConnectionLookup(lookup: Map<string, Connection[]>, edges: Edge[]) {
|
||||
lookup.clear();
|
||||
|
||||
edges.forEach((edge) => {
|
||||
const { source, target, sourceHandle = null, targetHandle = null } = edge;
|
||||
|
||||
edges.forEach(({ source, target, sourceHandle = null, targetHandle = null }) => {
|
||||
if (source && target) {
|
||||
const sourceKey = `${source}-source-${sourceHandle}`;
|
||||
const targetKey = `${target}-target-${targetHandle}`;
|
||||
|
||||
Reference in New Issue
Block a user