diff --git a/src/index.js b/src/index.js index e19a527..7ef5f5f 100644 --- a/src/index.js +++ b/src/index.js @@ -18,6 +18,7 @@ const isWebWorker = const isJsDom = (typeof window !== "undefined" && window.name === "nodejs") || (typeof navigator !== "undefined" && + typeof navigator.userAgent !== "undefined" && (navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom")));