Skip to content

Commit

Permalink
fix(env): try fixing detection for node environment (#1037)
Browse files Browse the repository at this point in the history
  • Loading branch information
plainheart committed Jul 2, 2024
1 parent 52e45b6 commit c0d7a35
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/core/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ else if (typeof document === 'undefined' && typeof self !== 'undefined') {
// In worker
env.worker = true;
}
else if (
(typeof process !== 'undefined' && typeof process.version === 'string')
|| (typeof navigator === 'undefined' || typeof navigator.userAgent === 'undefined')
|| (env.hasGlobalWindow && 'Deno' in window)
) {
else if (!env.hasGlobalWindow || 'Deno' in window) {
// In node
env.node = true;
env.svgSupported = true;
Expand Down

0 comments on commit c0d7a35

Please sign in to comment.