mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-21 01:13:37 +08:00
Fix #1889 error when closing first window during update
This commit is contained in:
parent
0bc15c4da7
commit
b6f4ceb028
8
main.js
8
main.js
@ -276,19 +276,19 @@ app.on('ready', () => {
|
||||
ipcMain.on('allow-auto-update', () => {
|
||||
autoUpdater.downloadUpdate()
|
||||
})
|
||||
orig_win.webContents.send('update-available', a);
|
||||
if (!orig_win.isDestroyed()) orig_win.webContents.send('update-available', a);
|
||||
})
|
||||
autoUpdater.on('update-downloaded', (a) => {
|
||||
console.log('update-downloaded', a)
|
||||
orig_win.webContents.send('update-downloaded', a)
|
||||
if (!orig_win.isDestroyed()) orig_win.webContents.send('update-downloaded', a)
|
||||
})
|
||||
autoUpdater.on('error', (a) => {
|
||||
console.log('update-error', a)
|
||||
orig_win.webContents.send('update-error', a)
|
||||
if (!orig_win.isDestroyed()) orig_win.webContents.send('update-error', a)
|
||||
})
|
||||
autoUpdater.on('download-progress', (a) => {
|
||||
console.log('update-progress', a)
|
||||
orig_win.webContents.send('update-progress', a)
|
||||
if (!orig_win.isDestroyed()) orig_win.webContents.send('update-progress', a)
|
||||
})
|
||||
autoUpdater.checkForUpdates().catch(err => {})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user