From 7ef055c63c6c9c932c9e9e95f9a6d73e7f702cfb Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Thu, 9 Nov 2017 14:55:54 +0530 Subject: [PATCH] Electron-139 - Updated the if condition --- js/desktopCapturer/getSources.js | 4 ++-- js/utils/misc.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/js/desktopCapturer/getSources.js b/js/desktopCapturer/getSources.js index fe797422..fbce373d 100644 --- a/js/desktopCapturer/getSources.js +++ b/js/desktopCapturer/getSources.js @@ -13,7 +13,7 @@ // electron: https://github.com/electron/electron/issues/9312 const { ipcRenderer, remote } = require('electron'); -const { isMac } = require('../utils/misc'); +const { isWindowsOS } = require('../utils/misc'); let nextId = 0; let includes = [].includes; @@ -53,7 +53,7 @@ function getSources(options, callback) { }; } - if (!isMac) { + if (isWindowsOS) { /** * Sets the captureWindow to false if Desktop composition * is disabled otherwise true diff --git a/js/utils/misc.js b/js/utils/misc.js index b44794c0..6ad3cf52 100644 --- a/js/utils/misc.js +++ b/js/utils/misc.js @@ -4,11 +4,13 @@ const isDevEnv = process.env.ELECTRON_DEV ? process.env.ELECTRON_DEV.trim().toLowerCase() === 'true' : false; const isMac = (process.platform === 'darwin'); +const isWindowsOS = (process.platform === 'win32'); const isNodeEnv = !!process.env.NODE_ENV; module.exports = { isDevEnv: isDevEnv, isMac: isMac, + isWindowsOS: isWindowsOS, isNodeEnv: isNodeEnv };