WIP: Enable Edit Sketch without variable declaration

This commit is contained in:
Jonathan Tran
2024-08-07 15:56:05 -04:00
parent eb28ed6cbf
commit a7f0a5607d

View File

@ -791,7 +791,7 @@ export function isSingleCursorInPipe(
const pathToNode = getNodePathFromSourceRange(ast, selection.range)
const nodeTypes = pathToNode.map(([, type]) => type)
if (nodeTypes.includes('FunctionExpression')) return false
if (!nodeTypes.includes('VariableDeclaration')) return false
// if (!nodeTypes.includes('VariableDeclaration')) return false
if (nodeTypes.includes('PipeExpression')) return true
return false
}