修复等待事件未清空的bug
parent
16149fdd38
commit
fb0e61f3b0
|
@ -69,11 +69,14 @@ const handleSendEvent = action => {
|
||||||
|
|
||||||
module.exports = isFirstCheckedUpdate => {
|
module.exports = isFirstCheckedUpdate => {
|
||||||
if (!isFirstCheckedUpdate) {
|
if (!isFirstCheckedUpdate) {
|
||||||
waitEvent.forEach((event, index) => {
|
if (waitEvent.length) {
|
||||||
setTimeout(() => { // 延迟发送事件,过早发送可能渲染进程还没启动完成
|
waitEvent.forEach((event, index) => {
|
||||||
global.mainWindow.webContents.send(event.type, event.info)
|
setTimeout(() => { // 延迟发送事件,过早发送可能渲染进程还没启动完成
|
||||||
}, 2000 * (index + 1))
|
global.mainWindow.webContents.send(event.type, event.info)
|
||||||
})
|
}, 2000 * (index + 1))
|
||||||
|
})
|
||||||
|
waitEvent = []
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
autoUpdater.on('checking-for-update', () => {
|
autoUpdater.on('checking-for-update', () => {
|
||||||
|
|
Loading…
Reference in New Issue