From f5b9f5a9101dfe3da3d07f1fe50abc5856ccbdac Mon Sep 17 00:00:00 2001 From: Reece Date: Thu, 18 Dec 2025 05:00:06 +0000 Subject: [PATCH] lint/tsc --- frontend/src/core/tools/annotate/AnnotationPanel.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/src/core/tools/annotate/AnnotationPanel.tsx b/frontend/src/core/tools/annotate/AnnotationPanel.tsx index ff26c99ee..216fe2e6d 100644 --- a/frontend/src/core/tools/annotate/AnnotationPanel.tsx +++ b/frontend/src/core/tools/annotate/AnnotationPanel.tsx @@ -546,9 +546,6 @@ export function AnnotationPanel(props: AnnotationPanelProps) { ); const selectedDerivedTool = selectedAnn?.object ? deriveToolFromAnnotation(selectedAnn.object) : undefined; - const selectedIsTextMarkup = - (selectedAnn?.object?.type && [9, 10, 11, 12].includes(selectedAnn.object.type)) || - (selectedDerivedTool ? ['highlight', 'underline', 'strikeout', 'squiggly'].includes(selectedDerivedTool) : false); const selectedAnnotationControls = selectedAnn && (() => { const rawType = selectedAnn.object?.type; @@ -888,7 +885,7 @@ export function AnnotationPanel(props: AnnotationPanelProps) { ); } - if ([4, 8].includes(type) || toolId === 'line' || toolId === 'polyline') { + if ((type !== undefined && [4, 8].includes(type)) || toolId === 'line' || toolId === 'polyline') { return ( @@ -944,7 +941,7 @@ export function AnnotationPanel(props: AnnotationPanelProps) { ); } - if ([5, 6, 7].includes(type) || toolId === 'square' || toolId === 'circle' || toolId === 'polygon') { + if ((type !== undefined && [5, 6, 7].includes(type)) || toolId === 'square' || toolId === 'circle' || toolId === 'polygon') { const shapeName = type === 5 ? 'Square' : type === 6 ? 'Circle' : 'Polygon'; const strokeColorValue = selectedAnn.object?.strokeColor ?? shapeStrokeColor; const fillColorValue = selectedAnn.object?.color ?? shapeFillColor;