From a58bf627e7a06556b73ae6ad4b5305620cb78733 Mon Sep 17 00:00:00 2001 From: Mihkel Allorg Date: Wed, 15 May 2019 11:00:51 +0300 Subject: [PATCH] Update Translatable.php Fixing translating with empty string --- src/Traits/Translatable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Traits/Translatable.php b/src/Traits/Translatable.php index d83f326..205b0c1 100644 --- a/src/Traits/Translatable.php +++ b/src/Traits/Translatable.php @@ -11,7 +11,7 @@ trait Translatable { public function translate($field, $language, $translation = null) { - if (! $translation) { + if (is_null($translation)) { $translation = Translator::translate($this->$field, $language); }