Skip to content

Commit

Permalink
FIX Preview link when no locale set
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Jun 10, 2024
1 parent 87abf4c commit 713786b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Extension/FluentExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -1160,8 +1160,11 @@ public function updateFluentCMSField(FormField $field)
public function updatePreviewLink(&$link): void
{
$owner = $this->owner;
$info = $owner->LocaleInformation(FluentState::singleton()->getLocale());

$locale = FluentState::singleton()->getLocale();
if ($locale === null || $locale === '') {
return;
}
$info = $owner->LocaleInformation($locale);
if (!$info->getSourceLocale()) {
$link = null;
}
Expand Down

0 comments on commit 713786b

Please sign in to comment.