From 6c3bce88a78ea6335d79b726e93a2cb6bf524c17 Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Thu, 25 Nov 2021 15:16:47 +0100 Subject: [PATCH] update(graph): mutate elements arr on updateEdge Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com> --- src/utils/graph.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/graph.ts b/src/utils/graph.ts index 433aad57..d48405bf 100644 --- a/src/utils/graph.ts +++ b/src/utils/graph.ts @@ -136,7 +136,7 @@ export const updateEdge = (oldEdge: Edge, newConnection: Connection, elements: E sourceHandle: newConnection.sourceHandle, targetHandle: newConnection.targetHandle, } - + elements.splice(elements.indexOf(foundEdge), 1, edge) return elements.filter((e) => e.id !== oldEdge.id).concat(edge) }