Skip to content

Commit

Permalink
Fix unable to close frame message
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister committed Mar 21, 2021
1 parent fec3bab commit f706c5f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/browser_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,13 @@ async function createUserProfileDir(config) {
/**
* Get the text content of an error or warning page inserted by the browser.
* The most common one is a page for an HTTPS-Error or lack of HTTPS.
* @param {import('puppeteer').Page} page
* @param {import('puppeteer').Page | import('puppeteer').Frame} pageOrFrame
* @param {Error} error
* @param {Promise<Error>}
*/
async function enhanceError(config, page, error) {
async function enhanceError(config, pageOrFrame, error) {
const page = pageOrFrame._frameManager._page;
// Frames don't have an isClosed()
if (!page.isClosed()) {
// Check if the page is injected by the browser like for an insecure
// form submission in Chrome.
Expand Down

0 comments on commit f706c5f

Please sign in to comment.