From 0cfd01c0f8034998f43b80c1db79a68a6722ec1f Mon Sep 17 00:00:00 2001 From: Matthew Williamson Date: Mon, 5 Apr 2021 16:22:47 -0700 Subject: [PATCH] Be more specific/strict on what we're trying to do --- api/WebApi.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/WebApi.ts b/api/WebApi.ts index 2634a8b..d8271d8 100644 --- a/api/WebApi.ts +++ b/api/WebApi.ts @@ -42,7 +42,8 @@ import os = require('os'); import url = require('url'); import path = require('path'); -const isBrowser: boolean = typeof window !== 'undefined' && Boolean(window.navigator); +const isNode = typeof process !== 'undefined' && process.release.name === 'node'; +const isBrowser: boolean = typeof window !== 'undefined' && !isNode; /** * Methods to return handler objects (see handlers folder) */