Never translate root page

This commit is contained in:
Matias Griese
2019-12-20 20:18:48 +02:00
parent 6a0d5c69ab
commit 8ff2ca4c5a

View File

@@ -44,6 +44,10 @@ trait PageTranslateTrait
*/
public function getTranslation(string $languageCode = null, bool $fallback = null)
{
if ($this->root()) {
return $this;
}
$code = $this->findTranslation($languageCode, $fallback);
if (null === $code) {
$object = null;