nit
This commit is contained in:
parent
9db325d790
commit
3ba527c0ad
|
|
@ -715,7 +715,7 @@ export class WKPage implements PageDelegate {
|
||||||
if (options.isMobile) {
|
if (options.isMobile) {
|
||||||
const angle = viewportSize.width > viewportSize.height ? 90 : 0;
|
const angle = viewportSize.width > viewportSize.height ? 90 : 0;
|
||||||
// Special handling for macOS 12.
|
// 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 }));
|
promises.push(this._pageProxySession.send(useLegacySetOrientationOverrideMethod ? 'Page.setOrientationOverride' as any : 'Emulation.setOrientationOverride', { angle }));
|
||||||
}
|
}
|
||||||
await Promise.all(promises);
|
await Promise.all(promises);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue