Merge pull request #140 from niieani/patch-1

Use 'node' version when using Electron with nodeIntegration enabled
This commit is contained in:
Linus Unnebäck 2016-07-14 15:23:28 +02:00 committed by GitHub
commit c676a64fb2

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