From 7864378858380fccd2d9a0f0d4fefc1760f7a75f Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Fri, 26 Jan 2024 08:07:54 +0000 Subject: [PATCH] fix: review --- lib/commands/device/common.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/commands/device/common.js b/lib/commands/device/common.js index c90f7451..e28be101 100644 --- a/lib/commands/device/common.js +++ b/lib/commands/device/common.js @@ -87,7 +87,7 @@ export async function getDeviceInfoFromCaps() { ((!_.includes(this.opts.platformVersion, '.') && /** @type {semver.SemVer} */ (semverPV).major === /** @type {semver.SemVer} */ (semverDO).major) || - (/** @type {semver.SemVer} */ (semverPV).major === + /** @type {semver.SemVer} */ ((semverPV).major === /** @type {semver.SemVer} */ (semverDO).major && /** @type {semver.SemVer} */ (semverPV).minor === /** @type {semver.SemVer} */ (semverDO).minor)) && @@ -127,12 +127,11 @@ export async function getDeviceInfoFromCaps() { /** * @this {AndroidDriver} - * @property {(AndroidDriverOpts & {emPort?: number})?} [opts=null] * @returns {Promise} */ export async function createADB() { // @ts-expect-error do not put arbitrary properties on opts - const {udid, emPort} = this.opts ?? {}; + const {udid, emPort} = this.opts; const adb = await createBaseADB(this.opts); adb.setDeviceId(udid ?? ''); if (emPort) {