Skip to content

Commit

Permalink
Fix error on entity canonical page when there is no site resolver.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbelcher authored Feb 1, 2024
1 parent 601cccb commit 3f89b0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/next/src/Render/MainContent/HtmlRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ protected function prepare(array $main_content, Request $request, RouteMatchInte
return $build;
}

$sites = $next_entity_type_config->getSiteResolver()->getSitesForEntity($entity);
if (!count($sites)) {
$sites = $next_entity_type_config->getSiteResolver()?->getSitesForEntity($entity);
if (!$sites) {
return $build;
}

Expand Down

0 comments on commit 3f89b0d

Please sign in to comment.