Skip to content

Commit

Permalink
🐛 await response.text() (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartveneman committed Mar 10, 2020
1 parent 0638338 commit d365e7f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ module.exports = async (url, {waitUntil = 'networkidle0'} = {}) => {
const headers = response.headers()

if (headers['content-type'].includes('text/css')) {
return Promise.resolve(response.text())
const css = await response.text()
return Promise.resolve(css)
}

const coverage = await page.coverage.stopCSSCoverage()
Expand Down

0 comments on commit d365e7f

Please sign in to comment.