Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add null check
Signed-off-by: Zabil Cheriya Maliackal <zabilcm@gmail.com>
  • Loading branch information
zabil committed Jul 16, 2024
commit 737d21ca458e1331fd253d5135506fff9f614ae6
2 changes: 1 addition & 1 deletion lib/actions/pageActionChecks.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const waitAndGetActionableElement = async (selector, force, checks = defaultChec
actionableElement = elements[0];
return;
}
if (elementsLength !== elements.length) {
if (elements && elementsLength !== elements.length) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this to avoid undefined error on elements

throw Error('Found too many matches. Please use a selector that is more specific');
}
throw new Error(`${description(selector)}${error}`);
Expand Down