Skip to content

Commit 0336576

Browse files
committed
Fix warnings condition
1 parent 3d41a01 commit 0336576

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/selenium-driver/src/smartui.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async function smartuiSnapshot(driver, name, options = {}) {
1919

2020
let { body } = await utils.postSnapshot({url, name, dom, options}, pkgName);
2121
log.info(`Snapshot captured: ${name}`);
22-
if (body.data.warnings?.length !== 0) body.data.warnings.map(e => log.warn(e));
22+
if (body && body.data && body.data.warnings?.length !== 0) body.data.warnings.map(e => log.warn(e));
2323
} catch (error) {
2424
throw new Error(error);
2525
}

0 commit comments

Comments
 (0)