Skip to content

Commit

Permalink
fix: alt may be undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland committed Nov 19, 2024
1 parent 0643720 commit c05a8e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Formatter/ImagePreview/FormatImagePreview.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function __invoke(Renderer $renderer, $context, string $xml)
$attributes['url'] = $fileUrl;
}

if ($attributes['alt'] === '{TEXT?}') {
if (Arr::get($attributes, 'alt') === '{TEXT?}') {
$attributes['alt'] = '';
}

Expand Down

0 comments on commit c05a8e0

Please sign in to comment.