Skip to content

Commit 23e3ba6

Browse files
committed
remove x-default from opengraph alternate
1 parent 4010420 commit 23e3ba6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: src/SeoManager.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,10 @@ public function setAlternates(?array $value): static
286286
if ($this->opengraph) {
287287
$this->opengraph->locale = new Locale(
288288
locale: $this->opengraph->locale?->locale ?? App::getLocale(),
289-
alternate: array_map(fn ($item) => $item->toOpenGraph(), $value ?? [])
289+
alternate: collect($value)
290+
->where('hreflang', '!=', 'x-default')
291+
->map(fn ($item) => $item->toOpenGraph())
292+
->toArray()
290293
);
291294
}
292295

0 commit comments

Comments
 (0)