diff --git a/src/Popover.tsx b/src/Popover.tsx index 4b49adf..0416250 100644 --- a/src/Popover.tsx +++ b/src/Popover.tsx @@ -179,7 +179,9 @@ export const Popover = forwardRef( ); const handleWindowResize = useCallback(() => { - window.requestAnimationFrame(() => positionPopover()); + if(childRef?.current){ + window.requestAnimationFrame(() => positionPopover()); + } }, [positionPopover]); useEffect(() => {