diff --git a/src/environment.ts b/src/environment.ts index 0d2a7a1f125cb..25c59864eb498 100644 --- a/src/environment.ts +++ b/src/environment.ts @@ -14,4 +14,8 @@ * limitations under the License. */ -export const isNode = typeof document === 'undefined'; +export const isNode = !!( + typeof process !== 'undefined' && + process.versions && + process.versions.node +);