Skip to content

Commit

Permalink
fix: checks for "slot" in HasHelper#getHelperComponent (#1270)
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoCardoso committed Jul 17, 2020
1 parent 471c08a commit 1cb2341
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ default public String getHelperText() {
default public TestBenchElement getHelperComponent() {
final ElementQuery<TestBenchElement> query = $(TestBenchElement.class).attribute("slot", "helper");
if (query.exists()) {
TestBenchElement last = query.last();
// To avoid getting the "slot" element, for components with slotted slots
return query.last();
if (!"slot".equals(last.getTagName())) {
return last;
}
}
return null;
}
Expand Down

0 comments on commit 1cb2341

Please sign in to comment.