diff --git a/apps/desktop/src/stores/connectionStore.ts b/apps/desktop/src/stores/connectionStore.ts index 62780469a8..2c01c380d2 100644 --- a/apps/desktop/src/stores/connectionStore.ts +++ b/apps/desktop/src/stores/connectionStore.ts @@ -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 = [];