diff --git a/src/Filament/Traits/HasExcerpt.php b/src/Filament/Traits/HasExcerpt.php index 188c52f6..d8001951 100644 --- a/src/Filament/Traits/HasExcerpt.php +++ b/src/Filament/Traits/HasExcerpt.php @@ -18,7 +18,15 @@ public function excerpt(): Attribute $paragraph = ''; foreach ($content as $key => $value) { if ($value['type'] === 'paragraph') { - $paragraph = $value['content'][0]['text']; // take the first part + if (isset($value['content'])) { + foreach ($value['content'] as $key => $valueContent) { + // find first instance of text + if (isset($valueContent['text'])) { + $paragraph = $valueContent['text']; // take the first part + break; + } + } + } } }