Skip to content

Commit 3cb4b43

Browse files
authored
fail silently if CSSCoverage API is already enabled (projectwallace#21)
1 parent e047ce6 commit 3cb4b43

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

_chromium.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ exports.extractCss = async url => {
4242
const page = await getPage()
4343

4444
// Start CSS coverage. This is the meat and bones of this module
45-
await page.coverage.startCSSCoverage()
45+
// Fail silently if it's already enabled
46+
await page.coverage.startCSSCoverage().catch(() => {})
4647

4748
const response = await page.goto(url, {waitUntil: 'networkidle2'})
4849

0 commit comments

Comments
 (0)