fix: 🚀 修复 macOS 简单关闭应用重新打开时报错的问题

This commit is contained in:
viarotel 2023-10-21 01:06:59 +08:00
parent 6c6c14b7ea
commit 4b259c3771
2 changed files with 3 additions and 8 deletions

View File

@ -54,6 +54,7 @@ jobs:
draft: true
prerelease: true
files: |
!dist-release/builder-debug.yml
dist-release/*.exe
dist-release/*.zip
dist-release/*.dmg
@ -64,6 +65,5 @@ jobs:
dist-release/*.tar.gz
dist-release/*.yml
dist-release/*.blockmap
!dist-release/builder-debug.yml
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

View File

@ -78,14 +78,9 @@ function createWindow() {
events(mainWindow)
}
// Quit when all windows are closed, except on macOS. There, it's common
// for applications and their menu bar to stay active until the user quits
// explicitly with Cmd + Q.
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
mainWindow = null
}
app.quit()
mainWindow = null
})
app.on('activate', () => {