fix point and click code pane closed from start (#2750)

tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2024-06-22 02:21:13 -07:00
committed by GitHub
parent a8c1a14d48
commit aad29fca9f
5 changed files with 177 additions and 33 deletions

View File

@ -1583,7 +1583,10 @@ export function transformAstSketchLines({
})
const varName = varDec.id.name
const sketchGroup = programMemory.root?.[varName]
let sketchGroup = programMemory.root?.[varName]
if (sketchGroup.type === 'ExtrudeGroup') {
sketchGroup = sketchGroup.sketchGroup
}
if (!sketchGroup || sketchGroup.type !== 'SketchGroup')
throw new Error('not a sketch group')
const seg = getSketchSegmentFromPathToNode(