From 1cf43bdf53476f9e34561ec1014170cabc64e576 Mon Sep 17 00:00:00 2001 From: Yota Toyama Date: Thu, 13 Jan 2022 11:02:14 -0800 Subject: [PATCH] Fix this library for react-native --- src/index.js | 1 + 1 file changed, 1 insertion(+) 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")));