From 7af178a1e400876e6c45dbe31a198a12d29227a8 Mon Sep 17 00:00:00 2001 From: Fabio Di Stasio Date: Mon, 28 Nov 2022 09:42:18 +0100 Subject: [PATCH] fix: wrong position moving elements outside folder --- src/renderer/stores/connections.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/stores/connections.ts b/src/renderer/stores/connections.ts index a3765387..75f70a56 100644 --- a/src/renderer/stores/connections.ts +++ b/src/renderer/stores/connections.ts @@ -165,7 +165,7 @@ export const useConnectionsStore = defineStore('connections', { name: conn.name }); - connIndex = connections.findIndex(conn => conn.uid === el.uid); + connIndex = connections.findIndex((conn, i) => conn.uid === el.uid && i !== el.index); connections.splice(connIndex, 1);// Delete old object }); }