From ac28c0cde3716dd684e088b4d12ca823b4316aaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgars=20Egl=C4=ABtis?= <37242620+eglitise@users.noreply.github.com> Date: Tue, 6 Feb 2024 15:11:52 +0200 Subject: [PATCH] fix: fix mobile: screenshots for WDIO (#731) --- lib/commands/screenshot.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/commands/screenshot.js b/lib/commands/screenshot.js index 501db727b..b7464d6c8 100644 --- a/lib/commands/screenshot.js +++ b/lib/commands/screenshot.js @@ -83,7 +83,8 @@ export async function mobileScreenshots(opts = {}) { ); const {displayId} = opts; - const displayIdStr = _.isNaN(displayId) ? null : `${displayId}`; + // @ts-ignore isNaN works properly here + const displayIdStr = isNaN(displayId) ? null : `${displayId}`; if (displayIdStr) { if (!infos[displayIdStr]) { throw new Error(