From 6c5fb36c36d194f8ca990eb68556069f970159ec Mon Sep 17 00:00:00 2001 From: David Fiala Date: Thu, 19 Oct 2023 09:52:29 -0700 Subject: [PATCH] proper isNode detection for node v21.0.0 --- src/common/Platform.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/Platform.ts b/src/common/Platform.ts index 41d8552e..2f329199 100644 --- a/src/common/Platform.ts +++ b/src/common/Platform.ts @@ -13,7 +13,7 @@ interface INavigator { // we want this module to live in common. declare const navigator: INavigator; -export const isNode = (typeof navigator === 'undefined') ? true : false; +export const isNode = (typeof process !== 'undefined') ? true : false; const userAgent = (isNode) ? 'node' : navigator.userAgent; const platform = (isNode) ? 'node' : navigator.platform;