Skip to content

Commit 94c70c2

Browse files
committed
Update node detection
1 parent 7142a33 commit 94c70c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ReactSpa/src/shared/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ if (typeof global === 'undefined') {
1414

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

17-
const isNode = typeof process === 'object';
17+
const isNode = typeof process === 'object' &&
18+
typeof process.versions === 'object' &&
19+
typeof process.versions.node !== 'undefined';
1820
if (isNode) {
1921
const packageConfig = require("../../package.json");
2022
let baseUrl = packageConfig["proxy"];

0 commit comments

Comments
 (0)