Skip to content

Commit

Permalink
Fix #167 bug with custom headline inputUnit field (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasbableck authored Feb 29, 2024
1 parent 33fc96a commit 1787c64
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Element/CustomElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,13 @@ private function addFragmentControllerDefaults()
$this->Template->element_html_id ??= $this->Template->cssID[0] ?? null;
$this->Template->element_css_classes ??= $this->Template->cssID[1] ?? '';

if (
(!\is_string($this->Template->headline) && $this->Template->headline !== null)
|| (!\is_string($this->Template->hl) && $this->Template->hl !== null)
) {
return;
}

// Legacy templates access the text using `$this->headline`, twig templates use `headline.text`
$this->Template->headline = new class($this->Template->headline, $this->Template->hl) implements \Stringable
{
Expand Down

0 comments on commit 1787c64

Please sign in to comment.