From 8da7d1794ba0c5bf7291c98ade6adfbc24af87d2 Mon Sep 17 00:00:00 2001 From: Maribeth Moffatt Date: Tue, 16 Sep 2025 09:01:51 -0700 Subject: [PATCH] fix: account for undefined first sibling (#9368) --- core/block_svg.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/block_svg.ts b/core/block_svg.ts index 295b80696..a22af525c 100644 --- a/core/block_svg.ts +++ b/core/block_svg.ts @@ -269,7 +269,7 @@ export class BlockSvg const firstSibling: BlockSvg = surroundParent.getChildren(false)[0]; const siblings: BlockSvg[] = [firstSibling]; let nextSibling: BlockSvg | null = firstSibling; - while ((nextSibling = nextSibling.getNextBlock())) { + while ((nextSibling = nextSibling?.getNextBlock())) { siblings.push(nextSibling); } return siblings;