huangfh 1 year ago
parent
commit
fedef7186d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/main.js

+ 3 - 1
src/main.js

@@ -68,7 +68,9 @@ app.on('before-quit', (event) => {
 })
 
 app.on('window-all-closed', () => {
-    if (process.platform !== 'darwin') app.quit();
+    if (mainWindow && !mainWindow.isDestroyed()) {
+        mainWindow.webContents.send('clear-token-cache');
+    }
 });
 
 app.on('will-quit', () => {