fix: change viewportHeight in screencast (#11583)

This commit is contained in:
Darío Kondratiuk 2023-12-28 02:54:41 -03:00 committed by GitHub
parent 949f4e90ca
commit 107b8337e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}).`