From 425f7b6f797ea79b30b0c2aef4a05d526b01f7ad Mon Sep 17 00:00:00 2001 From: kuaifan Date: Mon, 5 Jan 2026 09:36:22 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=9A=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E7=AA=97=E5=8F=A3=E5=85=B3=E9=97=AD=E5=90=8E=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E5=9B=9E=E8=B0=83=E5=AF=BC=E8=87=B4=E7=9A=84=E5=B4=A9?= =?UTF-8?q?=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/electron.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/electron/electron.js b/electron/electron.js index 4d10cd00b..abef2130c 100644 --- a/electron/electron.js +++ b/electron/electron.js @@ -913,6 +913,7 @@ function createWebTabWindow(args) { return {action: 'deny'} }) browserView.webContents.on('page-title-updated', (event, title) => { + if (!webTabWindow) return utils.onDispatchEvent(webTabWindow.webContents, { event: 'title', id: browserView.webContents.id, @@ -938,6 +939,7 @@ function createWebTabWindow(args) { }).then(_ => { }).catch(_ => { }) return } + if (!webTabWindow) return utils.onDispatchEvent(webTabWindow.webContents, { event: 'title', id: browserView.webContents.id, @@ -946,6 +948,7 @@ function createWebTabWindow(args) { }).then(_ => { }) }) browserView.webContents.on('page-favicon-updated', (event, favicons) => { + if (!webTabWindow) return utils.onDispatchEvent(webTabWindow.webContents, { event: 'favicon', id: browserView.webContents.id, @@ -956,12 +959,14 @@ function createWebTabWindow(args) { webTabView.forEach(({id: vid, view}) => { view.setVisible(vid === browserView.webContents.id) }) + if (!webTabWindow) return utils.onDispatchEvent(webTabWindow.webContents, { event: 'start-loading', id: browserView.webContents.id, }).then(_ => { }) }) browserView.webContents.on('did-stop-loading', _ => { + if (!webTabWindow) return utils.onDispatchEvent(webTabWindow.webContents, { event: 'stop-loading', id: browserView.webContents.id,