Skip to content

Commit a04adc5

Browse files
dsherretflexdinesh
authored andcommitted
fix: correct Deno check
1 parent ae67a84 commit a04adc5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ const isJsDom =
2121
(navigator.userAgent.includes("Node.js") ||
2222
navigator.userAgent.includes("jsdom")));
2323

24-
const isDeno = typeof Deno !== "undefined" && typeof Deno.core !== "undefined";
24+
const isDeno =
25+
typeof Deno !== "undefined" &&
26+
typeof Deno.version !== "undefined" &&
27+
typeof Deno.version.deno !== "undefined";
2528

2629
export { isBrowser, isWebWorker, isNode, isJsDom, isDeno };

0 commit comments

Comments
 (0)