We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2e1792 commit 80a2612Copy full SHA for 80a2612
src/testing/services/behat-dom.ts
@@ -375,11 +375,12 @@ export class TestingBehatDomUtilsService {
375
return element;
376
}
377
378
- if (element === container || !element.parentElement) {
+ const parent = this.getParentElement(element);
379
+ if (element === container || !parent) {
380
return null;
381
382
- return this.getClosestMatching(element.parentElement, selector, container);
383
+ return this.getClosestMatching(parent, selector, container);
384
385
386
/**
0 commit comments