From 1a3c3c8080aa6addc8454df162c60bc6217f81b6 Mon Sep 17 00:00:00 2001 From: Fracsi Date: Thu, 9 Jan 2025 21:40:58 +0100 Subject: [PATCH] Fix asset preloading --- templates/includes/_css_assets.html.twig | 10 +++------- templates/includes/_js_assets.html.twig | 10 +++------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/templates/includes/_css_assets.html.twig b/templates/includes/_css_assets.html.twig index 39163445e6..76ac21316d 100644 --- a/templates/includes/_css_assets.html.twig +++ b/templates/includes/_css_assets.html.twig @@ -1,10 +1,6 @@ {# @var assets \EasyCorp\Bundle\EasyAdminBundle\Dto\AssetDto[] #} {% for css_asset in assets %} - {% if css_asset.preload %} - - {% else %} - - {% endif %} + {% set href = asset(css_asset.value, css_asset.packageName) %} + {% endfor %} diff --git a/templates/includes/_js_assets.html.twig b/templates/includes/_js_assets.html.twig index d29e98cca2..e393853e55 100644 --- a/templates/includes/_js_assets.html.twig +++ b/templates/includes/_js_assets.html.twig @@ -1,10 +1,6 @@ {# @var assets \EasyCorp\Bundle\EasyAdminBundle\Dto\AssetDto[] #} {% for js_asset in assets %} - {% if js_asset.preload %} - - {% else %} - - {% endif %} + {% set src = asset(js_asset.value, js_asset.packageName) %} + {% endfor %}