mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-21 10:01:59 +00:00
fix: recover after crash
This commit is contained in:
parent
6db7491481
commit
67b44cdff0
2 changed files with 8 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "Miru",
|
"name": "Miru",
|
||||||
"version": "2.7.3",
|
"version": "2.7.4",
|
||||||
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
|
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"homepage": "https://github.com/ThaUnknown/miru#readme",
|
"homepage": "https://github.com/ThaUnknown/miru#readme",
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,13 @@ function createWindow () {
|
||||||
mainWindow = null
|
mainWindow = null
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mainWindow.webContents.on('render-process-gone', (e, { reason }) => {
|
||||||
|
if (reason === 'crashed') {
|
||||||
|
app.relaunch()
|
||||||
|
app.quit()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
// Emitted when the window is ready to be shown
|
// Emitted when the window is ready to be shown
|
||||||
// This helps in showing the window gracefully.
|
// This helps in showing the window gracefully.
|
||||||
mainWindow.once('ready-to-show', () => {
|
mainWindow.once('ready-to-show', () => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue