diff --git a/app/Domains/Documents/Transformers/DocXTransformer.php b/app/Domains/Documents/Transformers/DocXTransformer.php index 5afed180..56c08c7f 100644 --- a/app/Domains/Documents/Transformers/DocXTransformer.php +++ b/app/Domains/Documents/Transformers/DocXTransformer.php @@ -80,9 +80,10 @@ public function handle(Document $document): array /** @phpstan-ignore-next-line */ $content_flattened = collect($content)->map( function ($item) { - if($item instanceof TextRun) { + if ($item instanceof TextRun) { return str($item->getText())->trim()->toString(); } + return $item; } )->filter(