Skip to content

Commit

Permalink
Update Translate.php
Browse files Browse the repository at this point in the history
  • Loading branch information
grinry authored Feb 15, 2017
1 parent 2f0710d commit 9af543b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Eloquent/Translate.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class Translate implements JsonSerializable {
*/
public function __construct($string = '', $domain = '')
{
$decode = is_string($string) ? json_decode($string, true) : $string;
$decode = is_string($string) ? json_decode($string, true) : $string;
$this->translations = $decode ? $decode : [
config('app.fallback_locale') => $string
config('app.fallback_locale') => $string != '{}' ? $string : null
];
$this->locale = Translator::getLocale();
}
Expand Down

0 comments on commit 9af543b

Please sign in to comment.