From c34be53f4d8e19f034289b06d71ccf0106fc41c5 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Fri, 14 Mar 2025 12:01:37 -0400 Subject: [PATCH] [Bug] Handle null return value from createBounds (#3046) --- src/components/graph/SelectionOverlay.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/graph/SelectionOverlay.vue b/src/components/graph/SelectionOverlay.vue index 633aec123..371c16b47 100644 --- a/src/components/graph/SelectionOverlay.vue +++ b/src/components/graph/SelectionOverlay.vue @@ -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.