WIP: Enable Edit Sketch without variable declaration
This commit is contained in:
@ -795,7 +795,7 @@ export function isSingleCursorInPipe(
|
|||||||
const pathToNode = getNodePathFromSourceRange(ast, selection.range)
|
const pathToNode = getNodePathFromSourceRange(ast, selection.range)
|
||||||
const nodeTypes = pathToNode.map(([, type]) => type)
|
const nodeTypes = pathToNode.map(([, type]) => type)
|
||||||
if (nodeTypes.includes('FunctionExpression')) return false
|
if (nodeTypes.includes('FunctionExpression')) return false
|
||||||
if (!nodeTypes.includes('VariableDeclaration')) return false
|
// if (!nodeTypes.includes('VariableDeclaration')) return false
|
||||||
if (nodeTypes.includes('PipeExpression')) return true
|
if (nodeTypes.includes('PipeExpression')) return true
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user