Skip to content

Commit

Permalink
fix preview
Browse files Browse the repository at this point in the history
  • Loading branch information
RemyNovactive committed Aug 28, 2023
1 parent a3bcfa2 commit 2cb39de
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bundle/Listener/PreContentView.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ public function onPreContentView(PreContentViewEvent $event): void

$content = $contentView->getContent();

if ($content->contentInfo->isDraft()) {
return;
}

$protections = $this->protectedAccessRepository->findByContent($content);

if (0 === count($protections)) {
Expand Down

0 comments on commit 2cb39de

Please sign in to comment.