Skip to content

Commit

Permalink
fix: change viewportHeight in screencast (#11583)
Browse files Browse the repository at this point in the history
  • Loading branch information
kblok committed Dec 28, 2023
1 parent 949f4e9 commit 107b833
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/puppeteer-core/src/api/Page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2273,7 +2273,7 @@ export abstract class Page extends EventEmitter<PageEvents> {
}

const viewportWidth = width / devicePixelRatio;
const viewportHeight = width / devicePixelRatio;
const viewportHeight = height / devicePixelRatio;
if (x + cropWidth > viewportWidth) {
throw new Error(
`\`crop.width\` cannot be larger than the viewport width (${viewportWidth}).`
Expand Down

0 comments on commit 107b833

Please sign in to comment.