fixes null attachment bug
This commit is contained in:
parent
80662a6c9e
commit
a080748677
|
@ -81,11 +81,13 @@ class ArchiveSiteMetaViewHelper extends AbstractHelper
|
|||
foreach ($page->blocks() as $block) {
|
||||
if ($block->layout() === 'archiveSiteMeta') {
|
||||
$attachments = $block->attachments();
|
||||
if ($attachments) {
|
||||
$media = $attachments[0]->item()->media()[0];
|
||||
return $media->primaryMedia()->thumbnailUrl('large');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue