Skip to content

Commit

Permalink
Merge pull request #2756 from dpfaffenbauer/resource-translation
Browse files Browse the repository at this point in the history
[Resource] fallback locale could be null for newly created entities
  • Loading branch information
dpfaffenbauer authored Nov 24, 2024
2 parents 0809490 + 803b1e1 commit e94b102
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function getTranslation(string $locale = null, bool $useFallbackTranslati
return $translation;
}

if ($useFallbackTranslation) {
if ($useFallbackTranslation && null !== $this->fallbackLocale) {
$fallbackTranslation = $this->translations->get($this->fallbackLocale);
if (null !== $fallbackTranslation) {
$this->translationsCache[$this->fallbackLocale] = $fallbackTranslation;
Expand Down

0 comments on commit e94b102

Please sign in to comment.