diff --git a/src/core/env.ts b/src/core/env.ts index 52e3699a..ada4862b 100644 --- a/src/core/env.ts +++ b/src/core/env.ts @@ -37,7 +37,7 @@ else if (typeof document === 'undefined' && typeof self !== 'undefined') { // In worker env.worker = true; } -else if (!env.hasGlobalWindow || 'Deno' in window) { +else if (!env.hasGlobalWindow || 'Deno' in window || (navigator?.userAgent?.indexOf('Node.js') === 0)) { // In node env.node = true; env.svgSupported = true;