Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0cfd01c

Browse files
committedApr 5, 2021
Be more specific/strict on what we're trying to do
1 parent 61f31df commit 0cfd01c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎api/WebApi.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ import os = require('os');
4242
import url = require('url');
4343
import path = require('path');
4444

45-
const isBrowser: boolean = typeof window !== 'undefined' && Boolean(window.navigator);
45+
const isNode = typeof process !== 'undefined' && process.release.name === 'node';
46+
const isBrowser: boolean = typeof window !== 'undefined' && !isNode;
4647
/**
4748
* Methods to return handler objects (see handlers folder)
4849
*/

0 commit comments

Comments
 (0)
Please sign in to comment.