Skip to content

Commit 56025f5

Browse files
authored
Merge pull request #166 from oleksandr-danylchenko/fix-too-optimistic-popup-opening-check
⚠️ Fixed false-positive `open` setting ⚠️
2 parents 9111150 + c520219 commit 56025f5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/text-annotator-react/src/TextAnnotatorPopup/TextAnnotatorPopup.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ export const TextAnnotatorPopup = (props: TextAnnotationPopupProps) => {
7272

7373
useEffect(() => {
7474
const annotationSelector = annotation?.target.selector;
75-
if (!annotationSelector) return;
76-
77-
setOpen(isRevived(annotationSelector));
75+
setOpen(annotationSelector?.length > 0 ? isRevived(annotationSelector) : false);
7876
}, [annotation]);
7977

8078
useEffect(() => {

0 commit comments

Comments
 (0)