From 894f408179b323ea8ff212ce2cbfaaa83db2b155 Mon Sep 17 00:00:00 2001 From: uzlopak Date: Thu, 2 Nov 2023 10:26:06 +0100 Subject: [PATCH] fix: detect node21.1.0 --- src/core/env.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/env.ts b/src/core/env.ts index cd52e3d91..92c7f9e74 100644 --- a/src/core/env.ts +++ b/src/core/env.ts @@ -37,7 +37,10 @@ else if (typeof document === 'undefined' && typeof self !== 'undefined') { // In worker env.worker = true; } -else if (typeof navigator === 'undefined') { +else if ( + typeof navigator === 'undefined' || + navigator.userAgent.indexOf('Node.js') === 0 +) { // In node env.node = true; env.svgSupported = true;