diff --git a/src/SeoManager.php b/src/SeoManager.php index 4404003..f80a32f 100644 --- a/src/SeoManager.php +++ b/src/SeoManager.php @@ -286,7 +286,10 @@ public function setAlternates(?array $value): static if ($this->opengraph) { $this->opengraph->locale = new Locale( locale: $this->opengraph->locale?->locale ?? App::getLocale(), - alternate: array_map(fn ($item) => $item->toOpenGraph(), $value ?? []) + alternate: collect($value) + ->where('hreflang', '!=', 'x-default') + ->map(fn ($item) => $item->toOpenGraph()) + ->toArray() ); }