Skip to content

Commit 37efeeb

Browse files
committed
Make process node check stricter
Fixes #4995
1 parent 47409f3 commit 37efeeb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/Platform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ interface INavigator {
1414
declare const navigator: INavigator;
1515
declare const process: unknown;
1616

17-
export const isNode = (typeof process !== 'undefined') ? true : false;
17+
export const isNode = (typeof process !== 'undefined' && 'title' in (process as any)) ? true : false;
1818
const userAgent = (isNode) ? 'node' : navigator.userAgent;
1919
const platform = (isNode) ? 'node' : navigator.platform;
2020

0 commit comments

Comments
 (0)