From 4053f6674d9ca5aa056b5af53eb3a1166488fe58 Mon Sep 17 00:00:00 2001 From: gabrieljablonski Date: Sun, 12 Nov 2023 15:09:43 -0300 Subject: [PATCH] fix: force close on `hidden`/empty `content` --- src/components/Tooltip/Tooltip.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Tooltip/Tooltip.tsx b/src/components/Tooltip/Tooltip.tsx index 582fd954..32297bbf 100644 --- a/src/components/Tooltip/Tooltip.tsx +++ b/src/components/Tooltip/Tooltip.tsx @@ -710,9 +710,9 @@ const Tooltip = ({ } }, [id, anchorSelect]) - const canShow = !hidden && content && show && Object.keys(inlineStyles).length > 0 + const canShow = show && Object.keys(inlineStyles).length > 0 - return rendered ? ( + return rendered && !hidden && content ? (