From f0f2626a64dab32769ddc0ad78074dc6757db13c Mon Sep 17 00:00:00 2001 From: daniel11420 Date: Sun, 15 Mar 2020 19:24:08 +0100 Subject: [PATCH] fix cache clear error on macOS/darwin --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index b28daf4..4da7cb2 100644 --- a/main.js +++ b/main.js @@ -26,7 +26,7 @@ autoUpdater.checkForUpdatesAndNotify(); let mainWindow; function clearCache() { - mainWindow.webContents.session.clearCache(); + if (mainWindow != null) mainWindow.webContents.session.clearCache(); } function createWindow () {