Skip to content

Commit

Permalink
fabbot
Browse files Browse the repository at this point in the history
  • Loading branch information
smnandre committed Nov 11, 2024
1 parent 9cdc63a commit 78303c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TwigComponent/src/ComponentRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
final class ComponentRenderer implements ComponentRendererInterface
{
private array $templateClasses = [];

public function __construct(
private Environment $twig,
private EventDispatcherInterface $dispatcher,
Expand Down Expand Up @@ -67,7 +67,7 @@ public function render(MountedComponent $mounted): string
if ($templateIndex = $event->getTemplateIndex()) {
$variables['__parent__'] = $event->getParentTemplateForEmbedded();
}

try {
return $this->twig->loadTemplate(
$this->templateClasses[$template = $event->getTemplate()] ??= $this->twig->getTemplateClass($template),
Expand Down

0 comments on commit 78303c2

Please sign in to comment.