Skip to content

Commit

Permalink
fix: check if browser is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed May 15, 2021
1 parent 515c22e commit 630707f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/browserless/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ module.exports = ({ timeout = 30000, proxy: proxyUrl, retry = 2, ...launchOpts }
getBrowser().then(browser => browser.createIncognitoBrowserContext())

const getBrowser = async () => {
if (isClosed) return browserProcessPromise

const release = await lock()
const browserProcess = await browserProcessPromise

Expand Down

0 comments on commit 630707f

Please sign in to comment.