From f130d88477ff8bfc7d3dd5b07c5d00ed336f7d17 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Tue, 4 Aug 2020 12:31:02 -0500 Subject: [PATCH] Fix empty location for missing provider --- src/renderer/ipc/MountsIPC.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/ipc/MountsIPC.js b/src/renderer/ipc/MountsIPC.js index 8cd5b37..1767bc6 100644 --- a/src/renderer/ipc/MountsIPC.js +++ b/src/renderer/ipc/MountsIPC.js @@ -134,11 +134,11 @@ const addListeners = (ipcMain, {setTrayImage, standardIPCReply}) => { } }; - const setImage = (locations) => { + const setImage = locations => { let driveInUse; if (Object.keys(locations).length > 0) { for (const provider of providerList) { - driveInUse = locations[provider].length > 0; + driveInUse = locations[provider] && locations[provider].length > 0; if (driveInUse) break; }