Rename TooTip to ToolTip (#541)

This commit is contained in:
Adam Sunderland
2023-09-15 11:48:23 -04:00
committed by GitHub
parent e4f2e66029
commit f7971bddef
8 changed files with 33 additions and 30 deletions

View File

@ -1,4 +1,4 @@
import { TooTip, toolTips } from '../../useStore'
import { ToolTip, toolTips } from '../../useStore'
import {
Program,
VariableDeclarator,
@ -67,7 +67,10 @@ export function isSketchVariablesLinked(
return false
const firstCallExp = // first in pipe expression or just the call expression
init?.type === 'CallExpression' ? init : (init?.body[0] as CallExpression)
if (!firstCallExp || !toolTips.includes(firstCallExp?.callee?.name as TooTip))
if (
!firstCallExp ||
!toolTips.includes(firstCallExp?.callee?.name as ToolTip)
)
return false
// convention for sketch fns is that the second argument is the sketch group
const secondArg = firstCallExp?.arguments[1]