Skip to content

Commit

Permalink
fix: 🚀 修复 macOS 简单关闭应用重新打开时报错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Oct 20, 2023
1 parent 6c6c14b commit 4b259c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
draft: true
prerelease: true
files: |
!dist-release/builder-debug.yml
dist-release/*.exe
dist-release/*.zip
dist-release/*.dmg
Expand All @@ -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 }}
9 changes: 2 additions & 7 deletions electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit 4b259c3

Please sign in to comment.