diff --git a/packages/tldraw/src/lib/shapes/arrow/ArrowShapeUtil.tsx b/packages/tldraw/src/lib/shapes/arrow/ArrowShapeUtil.tsx index 2f3dc7215..a7587311b 100644 --- a/packages/tldraw/src/lib/shapes/arrow/ArrowShapeUtil.tsx +++ b/packages/tldraw/src/lib/shapes/arrow/ArrowShapeUtil.tsx @@ -676,6 +676,9 @@ export class ArrowShapeUtil extends ShapeUtil { const labelGeometry = shape.props.text.trim() ? (geometry.children[1] as Rectangle2d) : null + // eslint-disable-next-line react-hooks/rules-of-hooks + const isEditing = useIsEditing(shape.id) + if (!info) return null if (Vec2d.Equals(start, end)) return null @@ -693,9 +696,6 @@ export class ArrowShapeUtil extends ShapeUtil { const maskId = (shape.id + '_clip').replace(':', '_') - // eslint-disable-next-line react-hooks/rules-of-hooks - const isEditing = useIsEditing(shape.id) - if (isEditing && labelGeometry) { return (