Skip to content

Commit 9cba322

Browse files
committed
fix: check pixel ratio only when preferred pixel ratio is set
1 parent 0acdf51 commit 9cba322

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/browser/screen-shooter/elements-screen-shooter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ export class ElementsScreenShooter {
720720

721721
timeSpentOnCapture += performance.now() - captureStartTime;
722722

723-
if (isStrictAttempt && this._browserProperties.emulatedPixelRatio) {
723+
if (isStrictAttempt && this._browserProperties.emulatedPixelRatio && opts.preferredPixelRatio !== undefined) {
724724
const currentPixelRatio = await this._browserSideScreenshooter.call("getCurrentPixelRatio", []);
725725

726726
if (currentPixelRatio !== opts.preferredPixelRatio) {

0 commit comments

Comments
 (0)