Skip to content

Commit

Permalink
Update node detection
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed May 27, 2021
1 parent 7142a33 commit 94c70c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ReactSpa/src/shared/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ if (typeof global === 'undefined') {

export let client = new JsonServiceClient('/');

const isNode = typeof process === 'object';
const isNode = typeof process === 'object' &&
typeof process.versions === 'object' &&
typeof process.versions.node !== 'undefined';
if (isNode) {
const packageConfig = require("../../package.json");
let baseUrl = packageConfig["proxy"];
Expand Down

0 comments on commit 94c70c2

Please sign in to comment.