Skip to content

Commit

Permalink
emulateMedia was removed in puppeteer v5
Browse files Browse the repository at this point in the history
  • Loading branch information
maokomioko authored and romaimperator committed Nov 30, 2020
1 parent 21bfe2d commit 7bac593
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/javascript_bin/make_pdf.js
Expand Up @@ -44,7 +44,11 @@ stdin.on('end', function () {
let wait_promise = null;

if (typeof media_type !== 'undefined' && media_type) {
await page.emulateMedia(media_type);
if (typeof page.emulateMedia !== 'undefined') {
await page.emulateMedia(media_type);
} else {
await page.emulateMediaType(media_type);
}
}

if (typeof viewport_options !== 'undefined' && viewport_options) {
Expand Down

0 comments on commit 7bac593

Please sign in to comment.