Fix key count
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user