Skip to content

Commit

Permalink
Update Translatable.php
Browse files Browse the repository at this point in the history
Fixing translating with empty string
  • Loading branch information
mihkelallorg authored May 15, 2019
1 parent 3f8e3f2 commit a58bf62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Traits/Translatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit a58bf62

Please sign in to comment.