Skip to content

Commit 2cb39de

Browse files
committed
fix preview
1 parent a3bcfa2 commit 2cb39de

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

bundle/Listener/PreContentView.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ public function onPreContentView(PreContentViewEvent $event): void
7474

7575
$content = $contentView->getContent();
7676

77+
if ($content->contentInfo->isDraft()) {
78+
return;
79+
}
80+
7781
$protections = $this->protectedAccessRepository->findByContent($content);
7882

7983
if (0 === count($protections)) {

0 commit comments

Comments
 (0)