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 10, 2024
1 parent 3dc913d commit 4683d3b
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 @@ -141,3 +141,10 @@ app.whenReady().then(() => {

internalLog(`Cockpit version: ${app.getVersion()}`)
})

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 4683d3b

Please sign in to comment.