Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 815eca2

Browse files
fix: typo
1 parent 0aaa2c2 commit 815eca2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎lib/appium-driver.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,10 @@ export class AppiumDriver {
320320
try {
321321
const devicesInfos = IOSController.devicesDisplaysInfos();
322322
const matches = devicesInfos.filter(d => sessionInfoDetails.deviceName.includes(d.deviceType));
323-
const deviceType = matches[matches.length - 1];
324-
args.device.viewportRect.y += deviceType.statBarHeight * deviceType.density;
323+
if (matches && matches.length > 0) {
324+
const deviceType = matches[matches.length - 1];
325+
args.device.viewportRect.y += deviceType.actionBarHeight * deviceType.density;
326+
}
325327
} catch (error) { }
326328
}
327329

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /