Update GoogleSitemapSiteTreeExtension.php

This commit is contained in:
sinan-evanshunt 2021-12-15 11:16:30 -07:00 committed by GitHub
parent 7326028c7c
commit 8d321bd0a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -135,6 +135,10 @@ class GoogleSitemapSiteTreeExtension extends GoogleSitemapExtension
$cachedImages = [];
foreach ($this->owner->hasOne() as $field => $type) {
if (strpos($type, '.') !== false) {
$type = explode('.', $type)[0];
}
if (singleton($type) instanceof Image) {
$image = $this->owner->getComponent($field);