From f885f1f97541954e7f6d8060ddda2a8f1ceb2876 Mon Sep 17 00:00:00 2001 From: Olivier Bourdon Date: Fri, 26 Mar 2021 05:47:58 +0100 Subject: [PATCH] fix(index.js): fix exception when testing with Jest (#682) --- src/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.js b/src/index.js index 69b7d7abf..b951563ad 100755 --- a/src/index.js +++ b/src/index.js @@ -189,6 +189,7 @@ class ReactTooltip extends React.Component { let domRoot; switch (parentNode.constructor.name) { + case 'Document': case 'HTMLDocument': domRoot = parentNode.head; break;