From e96ca4deee6349eb98ac76e467ea02a3fc8729e5 Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Tue, 30 Apr 2024 13:20:27 +0200 Subject: [PATCH] FIx menu links active trail data producer (#779) --- .../src/Plugin/GraphQL/DataProducer/MenuLinksActiveTrail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/thunder_gqls/src/Plugin/GraphQL/DataProducer/MenuLinksActiveTrail.php b/modules/thunder_gqls/src/Plugin/GraphQL/DataProducer/MenuLinksActiveTrail.php index 926d639a6..1faf60209 100644 --- a/modules/thunder_gqls/src/Plugin/GraphQL/DataProducer/MenuLinksActiveTrail.php +++ b/modules/thunder_gqls/src/Plugin/GraphQL/DataProducer/MenuLinksActiveTrail.php @@ -106,7 +106,7 @@ public function __construct(array $configuration, $pluginId, $pluginDefinition, public function resolve(MenuInterface $menu, ?Url $url): array { $parameters = new MenuTreeParameters(); - if ($url) { + if ($url && $url->isRouted()) { $links = $this->menuLinkManager->loadLinksByRoute($url->getRouteName(), $url->getRouteParameters(), $menu->id()); $activeLink = reset($links);