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);