Skip to content

AI-native design editor. Open-source Figma alternative.

Guard against null Yoga children in layout application

Danila Poyarkov989378f444f5
diff --git a/packages/core/src/layout.ts b/packages/core/src/layout.ts
index 616cca2b3..5024a6593 100644
--- a/packages/core/src/layout.ts
+++ b/packages/core/src/layout.ts
@@ -252,6 +252,7 @@ function applyYogaLayout(graph: SceneGraph, frame: SceneNode, yogaNode: YogaNode
const yogaChild = yogaNode.getChild(yogaIndex)
yogaIndex++
+ if (!yogaChild) continue
graph.updateNode(child.id, {
x: yogaChild.getComputedLeft(),