This commit is contained in:
Kurt Hutten IrevDev
2022-11-27 14:07:03 +11:00
parent 6f24e75f92
commit 1831aad321
5 changed files with 34 additions and 31 deletions

View File

@ -108,7 +108,11 @@ export const executor = (
return _programMemory.root[arg.name]
}
})
if ('lineTo' === functionName || 'close' === functionName || 'base' === functionName) {
if (
'lineTo' === functionName ||
'close' === functionName ||
'base' === functionName
) {
if (options.bodyType !== 'sketch') {
throw new Error(
`Cannot call ${functionName} outside of a sketch declaration`