Skip to content

Commit

Permalink
Fix Textarea crashing inside Flexible
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarpsvo committed Nov 2, 2020
1 parent ac0f661 commit 2d98a67
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/TranslatableFieldMixin.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ public function translatable()
if ($this instanceof Textarea) {
$this->displayCallback = null;
parent::resolveForDisplay($resource, $attribute);
return $value;

if (is_string($value)) return $value;
return collect(array_values((array) ($value ?? [])))->filter()->first() ?? '';
}

$this->resolveForDisplay($resource, $attribute);
Expand Down

0 comments on commit 2d98a67

Please sign in to comment.