Skip to content

Commit

Permalink
[Resource] fallback locale could be null for newly created entities
Browse files Browse the repository at this point in the history
  • Loading branch information
dpfaffenbauer committed Nov 24, 2024
1 parent 0809490 commit 803b1e1
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 803b1e1

Please sign in to comment.