fix(editor): Add length check for selecting added nodes (no-changelog) (#11976)

This commit is contained in:
Alex Grozav 2024-12-09 15:27:58 +02:00 committed by GitHub
parent 3c4418f17b
commit 78c64adb09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 }) {