Use a default for `ignoreHover` when not supplied (#8617)

It is considered optional by the component props, so let's treat it as optional.
t3chguy/dedup-icons-17oct
Travis Ralston 2022-05-16 18:26:19 -06:00 committed by GitHub
parent 12cee6e29f
commit 5f8aecaf08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ const TooltipTarget: React.FC<IProps> = ({
...rest ...rest
}) => { }) => {
const [isFocused, focusProps] = useFocus(); const [isFocused, focusProps] = useFocus();
const [isHovering, hoverProps] = useHover(ignoreHover); const [isHovering, hoverProps] = useHover(ignoreHover || (() => false));
// No need to fill up the DOM with hidden tooltip elements. Only add the // No need to fill up the DOM with hidden tooltip elements. Only add the
// tooltip when we're hovering over the item (performance) // tooltip when we're hovering over the item (performance)