fix issue when click launch boss login page at second time after the last page closed, no thing happen.

This commit is contained in:
geekgeekrun
2024-03-02 23:03:11 +08:00
parent 5ca9bf08a5
commit 2b78d3dbd5

View File

@@ -73,8 +73,12 @@ export async function main() {
const [page] = await browser.pages();
page.once('close', () => {
page.once('close', async () => {
browser.close()
if (isRunFromUi) {
const electron = await import('electron')
electron.app.quit()
}
})
const { dispose: disposeNavigation } = await blockNavigation(page, (req) => !req.url().startsWith('https://www.zhipin.com'))