We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b58593 commit e70986dCopy full SHA for e70986d
src/lib/processMetadata.ts
@@ -27,12 +27,14 @@ export default async function processMetadata(
27
alternates: {
28
canonical: url,
29
languages: Object.fromEntries(
30
- page.translations?.map((t) => [
31
- t?.language,
32
- [BASE_URL, t?.language !== DEFAULT_LANG && t?.language, t?.slug]
33
- .filter(Boolean)
34
- .join('/'),
35
- ]) || [],
+ page.translations
+ ?.filter((t) => !!t.language)
+ ?.map((t) => [
+ t?.language,
+ [BASE_URL, t?.language !== DEFAULT_LANG && t?.language, t?.slug]
+ .filter(Boolean)
36
+ .join('/'),
37
+ ]) || [],
38
),
39
types: {
40
'application/rss+xml': '/blog/rss.xml',
0 commit comments