diff --git a/composer.json b/composer.json index f1a7be1..e007406 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "laravel", "laravel5" ], - "version": "1.1.17", + "version": "1.1.18", "authors": [ { "name": "Hyleeh", diff --git a/src/Node.php b/src/Node.php index d236b0d..595dd69 100644 --- a/src/Node.php +++ b/src/Node.php @@ -233,7 +233,9 @@ public function getTranslationAttribute($key, $locale = null, $fallback = true) { $locale = $locale ?: $this->locale(); - $attribute = $this->translate($locale)->$key; + $translation = $this->translate($locale); + + $attribute = ($translation) ? $translation->$key : null; if (empty($attribute) && $fallback) { diff --git a/src/Providers/HierarchyServiceProvider.php b/src/Providers/HierarchyServiceProvider.php index aa6d9d9..0d54fae 100644 --- a/src/Providers/HierarchyServiceProvider.php +++ b/src/Providers/HierarchyServiceProvider.php @@ -8,7 +8,7 @@ class HierarchyServiceProvider extends ServiceProvider { - const version = '1.1.17'; + const version = '1.1.18'; /** * Register the service provider.