1
0

Fix: When no variant is claimed, use base attachment as variant

This commit is contained in:
Richard Dern 2024-04-22 21:47:26 +02:00
parent a3d95b4743
commit 53b94e856c

View File

@ -158,7 +158,7 @@ public function replaceAttachmentsInMarkdown(string $markdown)
foreach ($matches[1] as $index => $ref) {
try {
$component = $this->getComponentByRef($ref, 'article');
$component = $this->getComponentByRef($ref);
} catch (Exception $ex) {
continue;
}
@ -188,6 +188,8 @@ public function getComponentByRef(string $ref, ?string $filter = null)
if (!empty($filter)) {
$variant['filename'] = $this->getVariantFullPath($ref, $filter);
} else {
$variant = $attachment;
}
$component = $this->getBladeComponent($attachment, $variant);