Skip to content

Commit c0d7a35

Browse files
committed
fix(env): try fixing detection for node environment (#1037)
1 parent 52e45b6 commit c0d7a35

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/core/env.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ else if (typeof document === 'undefined' && typeof self !== 'undefined') {
3737
// In worker
3838
env.worker = true;
3939
}
40-
else if (
41-
(typeof process !== 'undefined' && typeof process.version === 'string')
42-
|| (typeof navigator === 'undefined' || typeof navigator.userAgent === 'undefined')
43-
|| (env.hasGlobalWindow && 'Deno' in window)
44-
) {
40+
else if (!env.hasGlobalWindow || 'Deno' in window) {
4541
// In node
4642
env.node = true;
4743
env.svgSupported = true;

0 commit comments

Comments
 (0)