Skip to content

Commit

Permalink
electron: Fix problem of window going blank during hot reload
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaellehmkuhl committed Oct 11, 2024
1 parent e3d437a commit 534b1d1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,10 @@ protocol.registerSchemesAsPrivileged([
])

app.whenReady().then(createWindow)

app.on('before-quit', () => {
// @ts-ignore: import.meta.env does not exist in the types
if (import.meta.env.DEV) {
app.exit()
}
})

0 comments on commit 534b1d1

Please sign in to comment.