Fix: When no variant is claimed, use base attachment as variant
This commit is contained in:
parent
a3d95b4743
commit
53b94e856c
|
@ -158,7 +158,7 @@ public function replaceAttachmentsInMarkdown(string $markdown)
|
||||||
|
|
||||||
foreach ($matches[1] as $index => $ref) {
|
foreach ($matches[1] as $index => $ref) {
|
||||||
try {
|
try {
|
||||||
$component = $this->getComponentByRef($ref, 'article');
|
$component = $this->getComponentByRef($ref);
|
||||||
} catch (Exception $ex) {
|
} catch (Exception $ex) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -188,6 +188,8 @@ public function getComponentByRef(string $ref, ?string $filter = null)
|
||||||
|
|
||||||
if (!empty($filter)) {
|
if (!empty($filter)) {
|
||||||
$variant['filename'] = $this->getVariantFullPath($ref, $filter);
|
$variant['filename'] = $this->getVariantFullPath($ref, $filter);
|
||||||
|
} else {
|
||||||
|
$variant = $attachment;
|
||||||
}
|
}
|
||||||
|
|
||||||
$component = $this->getBladeComponent($attachment, $variant);
|
$component = $this->getBladeComponent($attachment, $variant);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user