Use 'node' version when using Electron with nodeIntegration enabled
This commit is contained in:
parent
c1941852bf
commit
f6427b9ec7
@ -30,7 +30,7 @@ function isInBrowser() {
|
||||
return true;
|
||||
if (environment === "node")
|
||||
return false;
|
||||
return ((typeof window !== 'undefined') && (typeof XMLHttpRequest === 'function'));
|
||||
return ((typeof window !== 'undefined') && (typeof XMLHttpRequest === 'function') && !(window.require && window.module && window.process && window.process.type === "renderer"));
|
||||
}
|
||||
|
||||
function hasGlobalProcessEventEmitter() {
|
||||
|
Loading…
Reference in New Issue
Block a user