Skip to content

Commit

Permalink
BUGFIX: Prevent loading error when a site has no uri
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebobo committed Aug 24, 2023
1 parent d37ce97 commit 3c29518
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Classes/Service/DataSource/CommandsDataSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public function getData(NodeInterface $node = null, array $arguments = []): arra

$sitesForMenu = array_reduce($this->menuHelper->buildSiteList($this->controllerContext),
static function (array $carry, array $site) {
if (!$site['uri']) {
return $carry;
}
$carry[$site['nodeName']] = new CommandDto(
$site['name'],
$site['name'],
Expand Down

0 comments on commit 3c29518

Please sign in to comment.