From 984cf151840b3e896898acd8a9cade6ff7ac0a21 Mon Sep 17 00:00:00 2001 From: Olivier Bourdon Date: Sun, 14 Mar 2021 20:50:29 +0100 Subject: [PATCH] fix(src/index.js): fix exception when testing with Jest --- 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;