mirror of
https://github.com/filamentphp/filament.git
synced 2026-10-24 12:04:06 +08:00
Add an empty check to avoid fatal error
This commit is contained in:
@@ -355,6 +355,10 @@ class RichContentRenderer implements Htmlable
|
||||
*/
|
||||
public function toJson(bool $decoded = false): string | array
|
||||
{
|
||||
if (empty($this->content)) {
|
||||
return $decoded ? [] : '';
|
||||
}
|
||||
|
||||
$editor = $this->getEditor();
|
||||
|
||||
if ($decoded) {
|
||||
|
||||
Reference in New Issue
Block a user