From 78c64adb09275f213a4d7cf3b5af14829913e01f Mon Sep 17 00:00:00 2001 From: Alex Grozav Date: Mon, 9 Dec 2024 15:27:58 +0200 Subject: [PATCH] fix(editor): Add length check for selecting added nodes (no-changelog) (#11976) --- packages/editor-ui/src/views/NodeView.v2.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/editor-ui/src/views/NodeView.v2.vue b/packages/editor-ui/src/views/NodeView.v2.vue index 56ad8f5a43..4f58b52294 100644 --- a/packages/editor-ui/src/views/NodeView.v2.vue +++ b/packages/editor-ui/src/views/NodeView.v2.vue @@ -911,7 +911,10 @@ async function onAddNodesAndConnections( await addConnections(mappedConnections); uiStore.resetLastInteractedWith(); - selectNodes([addedNodes[addedNodes.length - 1].id]); + + if (addedNodes.length > 0) { + selectNodes([addedNodes[addedNodes.length - 1].id]); + } } async function onRevertAddNode({ node }: { node: INodeUi }) {