From 8057c7e7fdac1ce4884eb6a5328cc49f706509b8 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Wed, 30 Aug 2023 15:33:43 +0800 Subject: [PATCH] Fix check for confirming if a highlight has a note --- packages/web/components/templates/article/HighlightsLayer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web/components/templates/article/HighlightsLayer.tsx b/packages/web/components/templates/article/HighlightsLayer.tsx index f2875f6d1..71561659b 100644 --- a/packages/web/components/templates/article/HighlightsLayer.tsx +++ b/packages/web/components/templates/article/HighlightsLayer.tsx @@ -472,7 +472,7 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element { async (action: HighlightAction, param?: string) => { switch (action) { case 'delete': - if (focusedHighlight?.annotation == undefined) { + if ((focusedHighlight?.annotation ?? '').length === 0) { await removeHighlightCallback() } else { setConfirmDeleteHighlightWithNoteId(focusedHighlight?.id)