From 7bbc76e3baeea50517f092d34245c20758b68d64 Mon Sep 17 00:00:00 2001 From: Konstantinv Vahrushev Date: Tue, 12 Dec 2023 22:55:52 +0200 Subject: [PATCH] fix setPosition typo --- src/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index a511891..d05a335 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -165,7 +165,7 @@ export const Popup = forwardRef( // set Position const setPosition = () => { if (isModal || !isOpen) return; - if (!triggerRef?.current || !triggerRef?.current || !contentRef?.current) + if (!triggerRef?.current || !contentRef?.current) return; /// show error as one of ref is undefined const trigger = triggerRef.current.getBoundingClientRect(); const content = contentRef.current.getBoundingClientRect();