puppeteer-in-electron
Advanced tools
Comparing version 3.0.4 to 3.0.5
@@ -109,3 +109,10 @@ "use strict"; | ||
const pages = await browser.pages(); | ||
const guids = await Promise.all(pages.map((testPage) => testPage.evaluate("window.puppeteer"))); | ||
const guids = await Promise.all(pages.map(async (testPage) => { | ||
try { | ||
return await testPage.evaluate("window.puppeteer"); | ||
} | ||
catch (_a) { | ||
return undefined; | ||
} | ||
})); | ||
const index = guids.findIndex((testGuid) => testGuid === guid); | ||
@@ -112,0 +119,0 @@ await window.webContents.executeJavaScript("delete window.puppeteer"); |
@@ -141,3 +141,9 @@ import getPort from "get-port"; | ||
const pages = await browser.pages(); | ||
const guids = await Promise.all(pages.map((testPage) => testPage.evaluate("window.puppeteer"))); | ||
const guids = await Promise.all(pages.map(async (testPage) => { | ||
try { | ||
return await testPage.evaluate("window.puppeteer") | ||
} catch { | ||
return undefined; | ||
} | ||
})); | ||
const index = guids.findIndex((testGuid) => testGuid === guid); | ||
@@ -144,0 +150,0 @@ await window.webContents.executeJavaScript("delete window.puppeteer"); |
{ | ||
"name": "puppeteer-in-electron", | ||
"version": "3.0.4", | ||
"version": "3.0.5", | ||
"description": "Run puppeteer within an electron app.", | ||
@@ -5,0 +5,0 @@ "main": "./bin/index.js", |
Sorry, the diff of this file is not supported yet
28482
454