Skip to content

Commit

Permalink
Added check before sending the target element predicate
Browse files Browse the repository at this point in the history
  • Loading branch information
Alon Haiut committed Feb 1, 2021
1 parent af3aa26 commit 5139bab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion detox/src/ios/expectTwo.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ class Element {
predicate: this.matcher.predicate
};

if (targetElementMatcher) {
if (targetElementMatcher && targetElementMatcher.matcher && targetElementMatcher.matcher.predicate) {
invocation.targetElement = {
predicate: targetElementMatcher.matcher.predicate
}
Expand Down

0 comments on commit 5139bab

Please sign in to comment.