[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
const bounds = createBounds(selectedItems)
updatePosition({
pos: [bounds[0], bounds[1]],
size: [bounds[2], bounds[3]]
})
if (bounds) {
updatePosition({
pos: [bounds[0], bounds[1]],
size: [bounds[2], bounds[3]]
})
}
}
// Register listener on canvas creation.