From 8c4336f219a83aa59ac48dfaee072fd6b880acc9 Mon Sep 17 00:00:00 2001 From: Daniel Barion Date: Wed, 22 Mar 2023 10:12:50 -0300 Subject: [PATCH 1/2] fix: update node contains conditional check on Tooltip component --- src/components/Tooltip/Tooltip.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Tooltip/Tooltip.tsx b/src/components/Tooltip/Tooltip.tsx index 27a08493..b10edb1b 100644 --- a/src/components/Tooltip/Tooltip.tsx +++ b/src/components/Tooltip/Tooltip.tsx @@ -374,7 +374,7 @@ const Tooltip = ({ } if (activeAnchor) { ;[...mutation.removedNodes].some((node) => { - if (node.contains(activeAnchor)) { + if (node?.contains && node.contains(activeAnchor)) { setRendered(false) handleShow(false) setActiveAnchor(null) From b04b0c5218b2db5aff0baac77ef4940af07ab614 Mon Sep 17 00:00:00 2001 From: Daniel Barion Date: Wed, 22 Mar 2023 10:29:28 -0300 Subject: [PATCH 2/2] Update src/components/Tooltip/Tooltip.tsx Co-authored-by: Gabriel Jablonski --- src/components/Tooltip/Tooltip.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Tooltip/Tooltip.tsx b/src/components/Tooltip/Tooltip.tsx index b10edb1b..894f805a 100644 --- a/src/components/Tooltip/Tooltip.tsx +++ b/src/components/Tooltip/Tooltip.tsx @@ -374,7 +374,7 @@ const Tooltip = ({ } if (activeAnchor) { ;[...mutation.removedNodes].some((node) => { - if (node?.contains && node.contains(activeAnchor)) { + if (node?.contains?.(activeAnchor)) { setRendered(false) handleShow(false) setActiveAnchor(null)