Use 'node' version when using Electron with nodeIntegration enabled

This commit is contained in:
Bazyli Brzóska 2016-07-04 09:45:04 +02:00 committed by GitHub
parent c1941852bf
commit f6427b9ec7

View File

@ -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() {