Skip to content

Commit

Permalink
fix originalActive strict truthy checks
Browse files Browse the repository at this point in the history
  • Loading branch information
pt8o committed Sep 3, 2024
1 parent a52c476 commit 96f1a55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions polaris-react/src/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export function Tooltip({
const hoverOutTimeout = useRef<NodeJS.Timeout | null>(null);

const handleFocus = useCallback(() => {
if (originalActive !== false) {
if (Boolean(originalActive) !== false) {
setActiveTrue();
}
}, [originalActive, setActiveTrue]);
Expand Down Expand Up @@ -168,7 +168,7 @@ export function Tooltip({
);

useEffect(() => {
if (originalActive === false && active) {
if (Boolean(originalActive) === false && active) {
handleClose();
handleBlur();
}
Expand Down

0 comments on commit 96f1a55

Please sign in to comment.