fix: use recursive findNode in disconnect to handle connections inside groups

This commit is contained in:
t8y2 committed 2026-05-29 15:40:22 +08:00
1 parent 4cf179f0c0
commit 76585b2e28
1 file changed
+1 -1
+1 -1
View File
@@ -655,7 +655,7 @@ export const useConnectionStore = defineStore("connection", () => {
const shouldRemoveOneTimeConnection = getConfig(connectionId)?.one_time === true;
await api.disconnectDb(connectionId);
connectedIds.value.delete(connectionId);
const node = treeNodes.value.find((n) => n.connectionId === connectionId);
const node = findNode(treeNodes.value, connectionId);
if (node) {
node.isExpanded = false;
node.children = [];