Fix to not crash when there's no var declaration (#3168)

This commit is contained in:
Jonathan Tran
2024-07-29 13:09:12 -04:00
committed by GitHub
parent cd9dc3e6a5
commit 6477011c0f

View File

@ -869,6 +869,7 @@ export function hasSketchPipeBeenExtruded(selection: Selection, ast: Program) {
)
if (err(_varDec)) return false
const varDec = _varDec.node
if (varDec.type !== 'VariableDeclarator') return false
let extruded = false
traverse(ast as any, {
enter(node) {