Add an empty check to avoid fatal error

This commit is contained in:
Sean O'Donnell
2025-09-02 11:26:03 +01:00
parent cec22a3605
commit f4c7c6722a
@@ -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) {