Fix check for confirming if a highlight has a note

This commit is contained in:
Jackson Harper
2023-08-30 15:33:43 +08:00
parent 85d5361d89
commit 8057c7e7fd

View File

@ -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)