From f6427b9ec70e066900bb30708f3735ff6bcf1e50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bazyli=20Brz=C3=B3ska?= Date: Mon, 4 Jul 2016 09:45:04 +0200 Subject: [PATCH] Use 'node' version when using Electron with nodeIntegration enabled --- source-map-support.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source-map-support.js b/source-map-support.js index 99b590c..a6902d7 100644 --- a/source-map-support.js +++ b/source-map-support.js @@ -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() {