From eb5198d60196145ac33a38e1645778d3a7d2131d Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Tue, 11 Dec 2018 22:17:34 -0600 Subject: [PATCH] Fix key count --- electron.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/electron.js b/electron.js index 3adaba2..00f26a2 100644 --- a/electron.js +++ b/electron.js @@ -280,7 +280,7 @@ ipcMain.on(Constants.IPC_Detect_Mounts, (event, data) => { for (let i = 'c'.charCodeAt(0); i <= 'z'.charCodeAt(0); i++) { const drive = (String.fromCharCode(i) + ':').toUpperCase(); let driveInUse; - if (locations.length > 0) { + if (Object.keys(locations).length > 0) { for (const provider of Constants.PROVIDER_LIST) { driveInUse = locations[provider].startsWith(drive); if (driveInUse) @@ -299,7 +299,7 @@ ipcMain.on(Constants.IPC_Detect_Mounts, (event, data) => { } } - if (locations.length > 0) { + if (Object.keys(locations).length > 0) { for (const provider of Constants.PROVIDER_LIST) { if (locations[provider].length > 0) { if (!driveLetters[provider].find((driveLetter) => { @@ -315,7 +315,7 @@ ipcMain.on(Constants.IPC_Detect_Mounts, (event, data) => { const setImage = (locations) => { if (os.platform() === 'win32' || os.platform() === 'linux') { let driveInUse; - if (locations.length > 0) { + if (Object.keys(locations).length > 0) { for (const provider of Constants.PROVIDER_LIST) { driveInUse = locations[provider].length > 0; if (driveInUse)