We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 470f9ca commit b5751bbCopy full SHA for b5751bb
api/WebApi.ts
@@ -42,7 +42,10 @@ import os = require('os');
42
import url = require('url');
43
import path = require('path');
44
45
-const isBrowser: boolean = typeof window !== 'undefined';
+const isElectron: boolean = process && process.versions && process.versions.hasOwnProperty('electron');
46
+const isElectronWebpage: boolean = isElectron && process.type === 'renderer';
47
+const isBrowser: boolean = typeof window !== 'undefined' && (!isElectron || isElectronWebpage);
48
+
49
/**
50
* Methods to return handler objects (see handlers folder)
51
*/
0 commit comments