Skip to content

Commit

Permalink
Merge pull request #1 from ChargePoint/CPSRV-38977
Browse files Browse the repository at this point in the history
[CPSRV-38977][react-tiny-popover] 3rd Party react-tiny-popover Error PR
  • Loading branch information
andriymalivanchuk-nix authored Jun 9, 2021
2 parents f9e3a84 + 9db6333 commit 3f8bbb8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ export const Popover = forwardRef<HTMLElement, PopoverProps>(
);

const handleWindowResize = useCallback(() => {
window.requestAnimationFrame(() => positionPopover());
if(childRef?.current){
window.requestAnimationFrame(() => positionPopover());
}
}, [positionPopover]);

useEffect(() => {
Expand Down

0 comments on commit 3f8bbb8

Please sign in to comment.