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 authored and nilmerg committed Sep 8, 2023
1 parent feebec1 commit 20105f9
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 @@ -116,6 +116,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 20105f9

Please sign in to comment.