Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Jun 11, 2024
1 parent 9db325d commit 3ba527c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/playwright-core/src/server/webkit/wkPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ export class WKPage implements PageDelegate {
if (options.isMobile) {
const angle = viewportSize.width > viewportSize.height ? 90 : 0;
// Special handling for macOS 12.
const useLegacySetOrientationOverrideMethod = parseInt(os.release().split('.')[0], 10) <= 21;
const useLegacySetOrientationOverrideMethod = os.platform() === 'darwin' && parseInt(os.release().split('.')[0], 10) <= 21;
promises.push(this._pageProxySession.send(useLegacySetOrientationOverrideMethod ? 'Page.setOrientationOverride' as any : 'Emulation.setOrientationOverride', { angle }));
}
await Promise.all(promises);
Expand Down

0 comments on commit 3ba527c

Please sign in to comment.