From 78303c2f622fe51738430262ec455abea6ae9d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Andr=C3=A9?= Date: Mon, 11 Nov 2024 02:05:21 +0100 Subject: [PATCH] fabbot --- src/TwigComponent/src/ComponentRenderer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TwigComponent/src/ComponentRenderer.php b/src/TwigComponent/src/ComponentRenderer.php index 29ad8971c2..c66f6abe56 100644 --- a/src/TwigComponent/src/ComponentRenderer.php +++ b/src/TwigComponent/src/ComponentRenderer.php @@ -25,7 +25,7 @@ final class ComponentRenderer implements ComponentRendererInterface { private array $templateClasses = []; - + public function __construct( private Environment $twig, private EventDispatcherInterface $dispatcher, @@ -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),