Fix extrude w/o pipe (#542)

This commit is contained in:
Adam Sunderland
2023-09-15 11:51:39 -04:00
committed by GitHub
parent f7971bddef
commit 7b7d5e5f5e

View File

@ -305,7 +305,11 @@ export function extrudeSketch(
}
const name = findUniqueName(node, 'part')
const VariableDeclaration = createVariableDeclaration(name, extrudeCall)
const showCallIndex = getShowIndex(_node)
let showCallIndex = getShowIndex(_node)
if (showCallIndex == -1) {
// We didn't find a show, so let's just append everything
showCallIndex = _node.body.length
}
_node.body.splice(showCallIndex, 0, VariableDeclaration)
const pathToExtrudeArg: PathToNode = [
['body', ''],