Skip to content

Commit

Permalink
Update code_samples/front/embed_content/src/Controller/RelationContro…
Browse files Browse the repository at this point in the history
…ller.php

Co-authored-by: Marek Nocoń <[email protected]>
  • Loading branch information
adriendupuis and mnocon authored Nov 26, 2024
1 parent f7ff827 commit 9bb3250
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function showContentAction(View $view, $locationId): View
$items = [];

foreach ($relationList as $relationListItem) {
if (in_array($relationListItem->getRelation()->getDestinationContentInfo()->getContentType()->identifier, $acceptedContentTypes)) {
if ($relationListItem->hasRelation() && in_array($relationListItem->getRelation()->getDestinationContentInfo()->getContentType()->identifier, $acceptedContentTypes)) {
$items[] = $this->contentService->loadContentByContentInfo($relationListItem->getRelation()->getDestinationContentInfo());
}
}
Expand Down

0 comments on commit 9bb3250

Please sign in to comment.