Fix path for starting second sketch (#474)

This commit is contained in:
Adam Sunderland
2023-09-13 11:49:19 -04:00
committed by GitHub
parent a5fa259d55
commit c9ed6c724c
2 changed files with 3 additions and 2 deletions

View File

@ -52,11 +52,12 @@ export function addStartSketch(
createPipeExpression(pipeBody)
)
const newIndex = node.body.length
_node.body = [...node.body, variableDeclaration]
let pathToNode: PathToNode = [
['body', ''],
['0', 'index'],
[newIndex.toString(10), 'index'],
['declarations', 'VariableDeclaration'],
['0', 'index'],
['init', 'VariableDeclarator'],