From 08c46fd66e41399b2620441f808eeae5ee83bfab Mon Sep 17 00:00:00 2001 From: kuaifan Date: Sat, 2 Apr 2022 08:44:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=83=A8=E5=88=86=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/electron.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/electron/electron.js b/electron/electron.js index 37206e342..f03c58b06 100644 --- a/electron/electron.js +++ b/electron/electron.js @@ -256,8 +256,8 @@ ipcMain.on('windowDestroy', (event) => { * 关闭所有子窗口 */ ipcMain.on('subWindowCloseAll', (event) => { - subWindow.some(item => { - item.close() + subWindow.some(({browser}) => { + browser && browser.close() }) event.returnValue = "ok" }) @@ -266,8 +266,8 @@ ipcMain.on('subWindowCloseAll', (event) => { * 销毁所有子窗口 */ ipcMain.on('subWindowDestroyAll', (event) => { - subWindow.some(item => { - item.destroy() + subWindow.some(({browser}) => { + browser && browser.destroy() }) event.returnValue = "ok" })