Skip to content

Commit

Permalink
BaseListItem: Don't assemble visual if it's empty
Browse files Browse the repository at this point in the history
  • Loading branch information
yhabteab committed Sep 8, 2023
1 parent 7be9c09 commit e0809ac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Common/BaseListItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ protected function createVisual(): ?BaseHtmlElement
$visual = new HtmlElement('div', Attributes::create(['class' => 'visual']));

$this->assembleVisual($visual);
if ($visual->isEmpty()) {
return null;
}

return $visual;
}
Expand Down

0 comments on commit e0809ac

Please sign in to comment.