[Bug] Handle null return value from createBounds (#3046)

This commit is contained in:
Chenlei Hu
2025-03-14 12:01:37 -04:00
committed by GitHub
parent 412500ea48
commit c34be53f4d

View File

@@ -38,10 +38,12 @@ const positionSelectionOverlay = (canvas: LGraphCanvas) => {
visible.value = true visible.value = true
const bounds = createBounds(selectedItems) const bounds = createBounds(selectedItems)
updatePosition({ if (bounds) {
pos: [bounds[0], bounds[1]], updatePosition({
size: [bounds[2], bounds[3]] pos: [bounds[0], bounds[1]],
}) size: [bounds[2], bounds[3]]
})
}
} }
// Register listener on canvas creation. // Register listener on canvas creation.